Commit 7fd834ad authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Linus Walleij

gpio: remove useless check in gpiolib_sysfs_init()

An iterator variable cannot be NULL in its loop.
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f7d4ad98
......@@ -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;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment