Selaa lähdekoodia

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>
Markus Elfring 9 vuotta sitten
vanhempi
commit
3f41a3c467
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      drivers/memory/omap-gpmc.c

+ 1 - 3
drivers/memory/omap-gpmc.c

@@ -2143,9 +2143,7 @@ err_child_fail:
 	ret = -ENODEV;
 	ret = -ENODEV;
 
 
 err_cs:
 err_cs:
-	if (waitpin_desc)
-		gpiochip_free_own_desc(waitpin_desc);
-
+	gpiochip_free_own_desc(waitpin_desc);
 err:
 err:
 	gpmc_cs_free(cs);
 	gpmc_cs_free(cs);