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@i...) 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