summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2013-10-20 15:14:57 -0700
committerLinus Walleij <linus.walleij@linaro.org>2013-10-23 10:09:22 +0200
commit5fcdb9dc98e76001060bb89e3b1269384f9f5201 (patch)
tree30b68b1c14036ef0d7f6c7cbc84c30e35f652887 /drivers/gpio
parent45f394391f93596782c6a5ec14f0a5428f60f9b3 (diff)
downloadlinux-5fcdb9dc98e76001060bb89e3b1269384f9f5201.tar.gz
linux-5fcdb9dc98e76001060bb89e3b1269384f9f5201.tar.bz2
linux-5fcdb9dc98e76001060bb89e3b1269384f9f5201.zip
gpiolib: devres: fix devm_gpiod_get_index()
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/devres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
index 2caa2571734e..fceebdc9e152 100644
--- a/drivers/gpio/devres.c
+++ b/drivers/gpio/devres.c
@@ -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);