gpio: remove useless check in gpiolib_sysfs_init()
authorAlexandre Courbot <acourbot@nvidia.com>
Wed, 23 Jul 2014 14:56:53 +0000 (23:56 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 24 Jul 2014 14:03:45 +0000 (16:03 +0200)
An iterator variable cannot be NULL in its loop.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-sysfs.c

index be45a9283c28fdafe14a8349aa70e6e625f3aedf..5f2150b619a72127b11942d712599d053ff62676 100644 (file)
@@ -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;
 
                /*