summaryrefslogtreecommitdiffstats
path: root/drivers/memory/omap-gpmc.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-07-23 18:54:02 +0200
committerRoger Quadros <rogerq@ti.com>2016-08-29 11:00:22 +0300
commit3f41a3c46727283a353f9a3fd510a4fc3d1c26b5 (patch)
tree309263e80c16cc7c1a1be7b3081c82873d88b7d3 /drivers/memory/omap-gpmc.c
parentfa8410b355251fd30341662a40ac6b22d3e38468 (diff)
downloadlinux-3f41a3c46727283a353f9a3fd510a4fc3d1c26b5.tar.bz2
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 <elfring@users.sourceforge.net> Signed-off-by: Roger Quadros <rogerq@ti.com>
Diffstat (limited to 'drivers/memory/omap-gpmc.c')
-rw-r--r--drivers/memory/omap-gpmc.c4
1 files changed, 1 insertions, 3 deletions
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);