gpiolib: devres: fix devm_gpiod_get_index()
authorAlexandre Courbot <acourbot@nvidia.com>
Sun, 20 Oct 2013 22:14:57 +0000 (15:14 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 23 Oct 2013 08:09:22 +0000 (10:09 +0200)
Fix the return value if devm_gpiod_get_index(). It was returning 0 while
it should return the obtained GPIO descriptor.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/devres.c

index 2caa2571734e4d415e5cb039599c0655e46e99b2..fceebdc9e152ccc079d8ca3561028f6d1990cc39 100644 (file)
@@ -80,7 +80,7 @@ struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev,
        *dr = desc;
        devres_add(dev, dr);
 
-       return 0;
+       return desc;
 }
 EXPORT_SYMBOL(devm_gpiod_get_index);