提交 7fd834ad 编写于 作者: A Alexandre Courbot 提交者: Linus Walleij

gpio: remove useless check in gpiolib_sysfs_init()

An iterator variable cannot be NULL in its loop.
Reported-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 f7d4ad98
...@@ -804,7 +804,7 @@ static int __init gpiolib_sysfs_init(void) ...@@ -804,7 +804,7 @@ static int __init gpiolib_sysfs_init(void)
*/ */
spin_lock_irqsave(&gpio_lock, flags); spin_lock_irqsave(&gpio_lock, flags);
list_for_each_entry(chip, &gpio_chips, list) { list_for_each_entry(chip, &gpio_chips, list) {
if (!chip || chip->exported) if (chip->exported)
continue; continue;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册