pinctrl: simplify of_pinctrl_get()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 18 Jun 2015 05:42:45 +0000 (14:42 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Jul 2015 07:39:03 +0000 (09:39 +0200)
This commit does not change the logic at all.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/devicetree.c

index 0bbf7d71b2811242a5a69db9fe97389c1acde5e8..fe04e748dfe4b5cf036af6e9e2af7ba7c0868b19 100644 (file)
@@ -97,13 +97,7 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,
 
 struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
 {
-       struct pinctrl_dev *pctldev;
-
-       pctldev = get_pinctrl_dev_from_of_node(np);
-       if (!pctldev)
-               return NULL;
-
-       return pctldev;
+       return get_pinctrl_dev_from_of_node(np);
 }
 
 static int dt_to_map_one_config(struct pinctrl *p, const char *statename,