]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: dm355_ccdc: remove unnecessary check of res
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 26 Apr 2022 03:05:42 +0000 (05:05 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:20 +0000 (11:02 +0200)
The resource is checked in probe function, so there is
no need do this check in remove function.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/ti/davinci/dm355_ccdc.c

index e06d113dfe9668d707e32f360091c563d679170b..8fe55d1b972cf6cba25115f7b87e104bb6cbe1f5 100644 (file)
@@ -918,8 +918,7 @@ static int dm355_ccdc_remove(struct platform_device *pdev)
 
        iounmap(ccdc_cfg.base_addr);
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (res)
-               release_mem_region(res->start, resource_size(res));
+       release_mem_region(res->start, resource_size(res));
        vpfe_unregister_ccdc_device(&ccdc_hw_dev);
        return 0;
 }