Patchwork [1/2] pinctrl: use ERR_CAST instead of ERR_PTR(PTR_ERR(...))

login
register
mail settings
Submitter Uwe Kleine-König
Date July 30, 2012, 4:38 p.m.
Message ID <1343666314-18070-1-git-send-email-u.kleine-koenig@pengutronix.de>
Download mbox | patch
Permalink /patch/174045/
State New
Headers show

Comments

Uwe Kleine-König - July 30, 2012, 4:38 p.m.
This doesn't change semantics, just looks nicer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 include/linux/pinctrl/consumer.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Linus Walleij - Aug. 7, 2012, 12:27 p.m.
On Mon, Jul 30, 2012 at 6:38 PM, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> This doesn't change semantics, just looks nicer.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied for v3.7.

Thanks,
Linus Walleij

Patch

diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
index 6dd96fb..5431f26 100644
--- a/include/linux/pinctrl/consumer.h
+++ b/include/linux/pinctrl/consumer.h
@@ -139,7 +139,7 @@  static inline struct pinctrl * __must_check devm_pinctrl_get_select(
 	s = pinctrl_lookup_state(p, name);
 	if (IS_ERR(s)) {
 		devm_pinctrl_put(p);
-		return ERR_PTR(PTR_ERR(s));
+		return ERR_CAST(s);
 	}
 
 	ret = pinctrl_select_state(p, s);