Skip to content

Commit

Permalink
gpio: remove useless check in gpiolib_sysfs_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Courbot authored and Linus Walleij committed Jul 24, 2014
1 parent f7d4ad9 commit 7fd834a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpiolib-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 7fd834a

Please sign in to comment.