pinctrl: consumer: use correct retval for placeholder functions
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 16 Dec 2014 09:59:17 +0000 (10:59 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 14 Jan 2015 13:21:51 +0000 (14:21 +0100)
These functions are supposed to return an error pointer, not NULL.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
include/linux/pinctrl/consumer.h

index 18eccefea06e40a0ea10f77e857105c6feaf4ff9..72c0415d6c21758d31fcd2ab80c33751e41489d5 100644 (file)
@@ -82,7 +82,7 @@ static inline int pinctrl_gpio_direction_output(unsigned gpio)
 
 static inline struct pinctrl * __must_check pinctrl_get(struct device *dev)
 {
-       return NULL;
+       return ERR_PTR(-ENOSYS);
 }
 
 static inline void pinctrl_put(struct pinctrl *p)
@@ -93,7 +93,7 @@ static inline struct pinctrl_state * __must_check pinctrl_lookup_state(
                                                        struct pinctrl *p,
                                                        const char *name)
 {
-       return NULL;
+       return ERR_PTR(-ENOSYS);
 }
 
 static inline int pinctrl_select_state(struct pinctrl *p,
@@ -104,7 +104,7 @@ static inline int pinctrl_select_state(struct pinctrl *p,
 
 static inline struct pinctrl * __must_check devm_pinctrl_get(struct device *dev)
 {
-       return NULL;
+       return ERR_PTR(-ENOSYS);
 }
 
 static inline void devm_pinctrl_put(struct pinctrl *p)