summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-sysfs.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-07-23 16:56:53 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-07-24 16:03:45 +0200
commit7fd834ad77f79fe0e8e9840238f18bdc088c97b6 (patch)
tree7c6c300e9a5d58f6ef1ed4350ca78f715a016c43 /drivers/gpio/gpiolib-sysfs.c
parentgpiolib: Export gpiochip_request_own_desc and gpiochip_free_own_desc (diff)
downloadlinux-7fd834ad77f79fe0e8e9840238f18bdc088c97b6.tar.xz
linux-7fd834ad77f79fe0e8e9840238f18bdc088c97b6.zip
gpio: remove useless check in gpiolib_sysfs_init()
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>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r--drivers/gpio/gpiolib-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index be45a9283c28..5f2150b619a7 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;
/*