Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bea4dbee authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Walleij
Browse files

gpio: gpiolib-of: Use PTR_ERR_OR_ZERO



PTR_RET is deprecated. Use PTR_ERR_OR_ZERO instead. While at it
also include missing err.h header.

Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent bdb93c03
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
 */

#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/io.h>
@@ -90,7 +91,7 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,

	of_node_put(gg_data.gpiospec.np);
	pr_debug("%s exited with status %d\n", __func__,
		 PTR_RET(gg_data.out_gpio));
		 PTR_ERR_OR_ZERO(gg_data.out_gpio));
	return gg_data.out_gpio;
}
EXPORT_SYMBOL(of_get_named_gpiod_flags);