Browse Source

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>
Alexandre Courbot 11 years ago
parent
commit
5fcdb9dc98
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gpio/devres.c

+ 1 - 1
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);