From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Xu Yan <xuyan1481@phytium.com.cn>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:openEuler-1.0-LTS 21365/22424] drivers/media/platform/phytium-jpeg/phytium_jpeg_core.c:1301:5-11: inconsistent IS_ERR and PTR_ERR on line 1303.
Date: Tue, 14 May 2024 03:58:45 +0800 [thread overview]
Message-ID: <202405140308.WGE9RFya-lkp@intel.com> (raw)
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 819e21d7b3e4610b4f9d6531b4fcd61ad2e9770a
commit: a773f33429ed6187436dd27117f3cc74a65a5344 [21365/22424] jpeg: Add a Phytium JPEG Engine driver
config: arm64-randconfig-r051-20240514 (https://download.01.org/0day-ci/archive/20240514/202405140308.WGE9RFya-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405140308.WGE9RFya-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/media/platform/phytium-jpeg/phytium_jpeg_core.c:1301:5-11: inconsistent IS_ERR and PTR_ERR on line 1303.
drivers/media/platform/phytium-jpeg/phytium_jpeg_core.c:1308:5-11: inconsistent IS_ERR and PTR_ERR on line 1310.
vim +1301 drivers/media/platform/phytium-jpeg/phytium_jpeg_core.c
1279
1280 static int phytium_jpeg_probe(struct platform_device *pdev)
1281 {
1282 struct phytium_jpeg_dev *jpeg_dev;
1283 const struct of_device_id *match;
1284 const struct phytium_jpeg_config *config;
1285 struct resource *res;
1286 int ret;
1287
1288 jpeg_dev = devm_kzalloc(&pdev->dev, sizeof(*jpeg_dev), GFP_KERNEL);
1289 if (jpeg_dev == NULL)
1290 return -ENOMEM;
1291
1292 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1293 jpeg_dev->base_addr = devm_ioremap_resource(&pdev->dev, res);
1294 if (IS_ERR(jpeg_dev->base_addr)) {
1295 dev_err(jpeg_dev->dev, "Failed to ioremap.\n");
1296 return PTR_ERR(jpeg_dev->base_addr);
1297 }
1298
1299 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
1300 jpeg_dev->timer30_addr = devm_ioremap_resource(&pdev->dev, res);
> 1301 if (IS_ERR(jpeg_dev->base_addr)) {
1302 dev_err(jpeg_dev->dev, "Failed to parse timer30.\n");
> 1303 return PTR_ERR(jpeg_dev->timer30_addr);
1304 }
1305
1306 res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
1307 jpeg_dev->timer31_addr = devm_ioremap_resource(&pdev->dev, res);
1308 if (IS_ERR(jpeg_dev->base_addr)) {
1309 dev_err(jpeg_dev->dev, "Failed to parse timer30.\n");
1310 return PTR_ERR(jpeg_dev->timer31_addr);
1311 }
1312 match = of_match_node(phytium_jpeg_match, pdev->dev.of_node);
1313 if (match == NULL) {
1314 dev_err(jpeg_dev->dev, "Failed to match.\n");
1315 return -EINVAL;
1316 }
1317
1318 config = match->data;
1319 jpeg_dev->comp_size_read = config->comp_size_read;
1320
1321 jpeg_dev->frame_rate = 30;
1322 jpeg_dev->dev = &pdev->dev;
1323 spin_lock_init(&jpeg_dev->hw_lock);
1324 mutex_init(&jpeg_dev->video_lock);
1325 init_waitqueue_head(&jpeg_dev->wait);
1326 INIT_DELAYED_WORK(&jpeg_dev->res_work, phytium_jpeg_resolution_work);
1327 INIT_LIST_HEAD(&jpeg_dev->buffers);
1328
1329 ret = phytium_jpeg_init(jpeg_dev);
1330 if (ret != 0) {
1331 dev_err(jpeg_dev->dev, "Failed to initialize the JPEG engine.\n");
1332 return ret;
1333 }
1334
1335 ret = phytium_jpeg_setup_video(jpeg_dev);
1336
1337 return ret;
1338 }
1339
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-13 19:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202405140308.WGE9RFya-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=xuyan1481@phytium.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).