Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Sachin Kamat and committed by
Linus Walleij
bea4dbee bdb93c03

+2 -1
+2 -1
drivers/gpio/gpiolib-of.c
··· 12 12 */ 13 13 14 14 #include <linux/device.h> 15 + #include <linux/err.h> 15 16 #include <linux/errno.h> 16 17 #include <linux/module.h> 17 18 #include <linux/io.h> ··· 91 90 92 91 of_node_put(gg_data.gpiospec.np); 93 92 pr_debug("%s exited with status %d\n", __func__, 94 - PTR_RET(gg_data.out_gpio)); 93 + PTR_ERR_OR_ZERO(gg_data.out_gpio)); 95 94 return gg_data.out_gpio; 96 95 } 97 96 EXPORT_SYMBOL(of_get_named_gpiod_flags);