[1/1,linux-next,RESEND] pinctrl: use ERR_CAST instead of ERR_PTR/PTR_ERR
diff mbox

Message ID 1430150646-21946-1-git-send-email-fabf@skynet.be
State New
Headers show

Commit Message

Fabian Frederick April 27, 2015, 4:04 p.m. UTC
Inspired by scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 include/linux/pinctrl/consumer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij May 6, 2015, 1:35 p.m. UTC | #1
On Mon, Apr 27, 2015 at 6:04 PM, Fabian Frederick <fabf@skynet.be> wrote:

> Inspired by scripts/coccinelle/api/err_cast.cocci
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
index 18eccef..d7e5d60 100644
--- a/include/linux/pinctrl/consumer.h
+++ b/include/linux/pinctrl/consumer.h
@@ -142,7 +142,7 @@  static inline struct pinctrl * __must_check pinctrl_get_select(
 	s = pinctrl_lookup_state(p, name);
 	if (IS_ERR(s)) {
 		pinctrl_put(p);
-		return ERR_PTR(PTR_ERR(s));
+		return ERR_CAST(s);
 	}
 
 	ret = pinctrl_select_state(p, s);