mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
deinterlace: deinterlace: fix coverity error [1/1]
PD#SWPL-2863 Problem: cdev_add without checking return value. Solution: add check Verify: p212 Change-Id: Ib1d96f6e5ee07dd28f67eb4ee77acb6580a1f877 Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
This commit is contained in:
@@ -7497,7 +7497,10 @@ static int di_probe(struct platform_device *pdev)
|
||||
di_devp->flags |= DI_SUSPEND_FLAG;
|
||||
cdev_init(&(di_devp->cdev), &di_fops);
|
||||
di_devp->cdev.owner = THIS_MODULE;
|
||||
cdev_add(&(di_devp->cdev), di_devno, DI_COUNT);
|
||||
ret = cdev_add(&(di_devp->cdev), di_devno, DI_COUNT);
|
||||
if (ret)
|
||||
goto fail_cdev_add;
|
||||
|
||||
di_devp->devt = MKDEV(MAJOR(di_devno), 0);
|
||||
di_devp->dev = device_create(di_clsp, &pdev->dev,
|
||||
di_devp->devt, di_devp, "di%d", 0);
|
||||
@@ -7648,6 +7651,14 @@ static int di_probe(struct platform_device *pdev)
|
||||
pr_err("%s create kthread error.\n", __func__);
|
||||
di_debugfs_init(); /*2018-07-18 add debugfs*/
|
||||
di_patch_post_update_mc_sw(DI_MC_SW_IC, true);
|
||||
|
||||
pr_info("%s:ok\n", __func__);
|
||||
return ret;
|
||||
|
||||
fail_cdev_add:
|
||||
pr_info("%s:fail_cdev_add\n", __func__);
|
||||
kfree(di_devp);
|
||||
|
||||
fail_kmalloc_dev:
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user