From: Alexandre Courbot Date: Sun, 20 Oct 2013 22:14:57 +0000 (-0700) Subject: gpiolib: devres: fix devm_gpiod_get_index() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5fcdb9dc98e76001060bb89e3b1269384f9f5201;p=linux-beck.git 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 Signed-off-by: Linus Walleij --- 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);