* [PATCH 1/1] gpio: gpiolib-of: Use PTR_ERR_OR_ZERO
@ 2014-01-27 6:45 Sachin Kamat
2014-01-31 11:33 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2014-01-27 6:45 UTC (permalink / raw)
To: linux-gpio; +Cc: linus.walleij, gnurou, sachin.kamat, patches
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>
---
drivers/gpio/gpiolib-of.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index e0a98f581f58..2024d45e5503 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] gpio: gpiolib-of: Use PTR_ERR_OR_ZERO
2014-01-27 6:45 [PATCH 1/1] gpio: gpiolib-of: Use PTR_ERR_OR_ZERO Sachin Kamat
@ 2014-01-31 11:33 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-01-31 11:33 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-gpio@vger.kernel.org, Alexandre Courbot, Patch Tracking
On Mon, Jan 27, 2014 at 7:45 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> 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>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-31 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-27 6:45 [PATCH 1/1] gpio: gpiolib-of: Use PTR_ERR_OR_ZERO Sachin Kamat
2014-01-31 11:33 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).