From: Alexandre Courbot Date: Wed, 23 Jul 2014 14:56:53 +0000 (+0900) Subject: gpio: remove useless check in gpiolib_sysfs_init() X-Git-Tag: v3.17-rc1~71^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fd834ad77f79fe0e8e9840238f18bdc088c97b6;p=thirdparty%2Fkernel%2Flinux.git gpio: remove useless check in gpiolib_sysfs_init() An iterator variable cannot be NULL in its loop. Reported-by: Julia Lawall Signed-off-by: Alexandre Courbot Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index be45a9283c28f..5f2150b619a72 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -804,7 +804,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; /*