diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index e9b7f4350844435daf050bd539de04d44fe4b6fa..d2816454c2633fb6b68bc576dc053eea27fd0920 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -140,7 +140,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);