]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: dm644x_ccdc: remove unnecessary check of res
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 26 Apr 2022 03:05:43 +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/dm644x_ccdc.c

index c6378c4e00745db3bbf8a570fc96f242ebbb4317..e4073e99914c077aa3b1bc5c58d547cf313b673b 100644 (file)
@@ -839,8 +839,7 @@ static int dm644x_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;
 }