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

index c53cecd072b16c15d24809e5565baa4727db7e29..69e862de014fd9891b702f84e28c007277e71fdc 100644 (file)
@@ -1107,8 +1107,7 @@ static int isif_remove(struct platform_device *pdev)
        isif_cfg.linear_tbl1_addr = NULL;
        while (i < 3) {
                res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-               if (res)
-                       release_mem_region(res->start, resource_size(res));
+               release_mem_region(res->start, resource_size(res));
                i++;
        }
        vpfe_unregister_ccdc_device(&isif_hw_dev);