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>
This commit is contained in:
parent
45f394391f
commit
5fcdb9dc98
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user