Skip to contentSkip to conversation

gpio: remove useless check in gpiolib_sysfs_init()

PATCH In review Alexandre Courbot 2 participants 2 messages Jul 23, 2014 – Jul 24, 2014 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: remove useless check in gpiolib_sysfs_init()

An iterator variable cannot be NULL in its loop.

---
 drivers/gpio/gpiolib-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-sysfs.c +1 -1
index 3516502..bcc0ec0 100644
@@ -814,7 +814,7 @@ static int __init gpiolib_sysfs_init(void)
 	 */
 	spin_lock_irqsave(&gpio_lock, flags);
 	list_for_each_entry(chip, &gpio_chips, list) {
-		if (!chip || chip->exported)
+		if (chip->exported)
 			continue;
 
 		spin_unlock_irqrestore(&gpio_lock, flags);
Signature · 1 line
2.0.2