Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1448976 > unrolled thread

[PATCH] memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc"

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-07-23 19:10 +0200
Last post2016-07-23 19:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] memory: omap-gpmc: Delete an unnecessary check before the  function call "gpiochip_free_own_desc" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-23 19:10 +0200

#1448976 — [PATCH] memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc"

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-07-23 19:10 +0200
Subject[PATCH] memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc"
Message-ID<rY8B4-5pp-23@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 23 Jul 2016 18:54:02 +0200

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>
---
 drivers/memory/omap-gpmc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 869c83f..e138875 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);
 
-- 
2.9.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web