From: Yang Yingliang Date: Tue, 26 Apr 2022 03:05:44 +0000 (+0200) Subject: media: isif: remove unnecessary check of res X-Git-Tag: v6.1-rc5~1294^2~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d83d2e08811b0b02e6a67aab3ca250e403d1cade;p=platform%2Fkernel%2Flinux-starfive.git media: isif: remove unnecessary check of res The resource is checked in probe function, so there is no need do this check in remove function. Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/ti/davinci/isif.c b/drivers/media/platform/ti/davinci/isif.c index c53cecd..69e862d 100644 --- a/drivers/media/platform/ti/davinci/isif.c +++ b/drivers/media/platform/ti/davinci/isif.c @@ -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);