Skip to content

Commit

Permalink
gpiolib: devres: fix devm_gpiod_get_index()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Courbot authored and Linus Walleij committed Oct 23, 2013
1 parent 45f3943 commit 5fcdb9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/devres.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5fcdb9d

Please sign in to comment.