From: Markus Elfring Date: Sat, 23 Jul 2016 16:54:02 +0000 (+0200) Subject: memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_fre... X-Git-Tag: v4.9-rc1~77^2~14^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3f41a3c46727283a353f9a3fd510a4fc3d1c26b5;p=karo-tx-linux.git memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc" The gpiochip_free_own_desc() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Roger Quadros --- diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 869c83fb3c5d..e138875a3196 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2143,9 +2143,7 @@ err_child_fail: ret = -ENODEV; err_cs: - if (waitpin_desc) - gpiochip_free_own_desc(waitpin_desc); - + gpiochip_free_own_desc(waitpin_desc); err: gpmc_cs_free(cs);