summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-04-27 16:04:05 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2015-05-06 13:34:51 (GMT)
commit66eb3bd857f5311f72c7c371f78ddc9c472befba (patch)
tree3f2cebf02c180510fb7cb040383a2bcf49af6a54
parent0b354dc4335b230c05d8de3648404943553ca54f (diff)
downloadlinux-66eb3bd857f5311f72c7c371f78ddc9c472befba.tar.xz
pinctrl: use ERR_CAST instead of ERR_PTR/PTR_ERR
Inspired by scripts/coccinelle/api/err_cast.cocci Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--include/linux/pinctrl/consumer.h2
1 files changed, 1 insertions, 1 deletions
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);