diff mbox

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

Message ID 1343666314-18070-1-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Uwe Kleine-König July 30, 2012, 4:38 p.m. UTC
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(-)

Comments

Linus Walleij Aug. 7, 2012, 12:27 p.m. UTC | #1
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
diff mbox

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);