pinctrl: st: st_pctl_dt_parse_groups simplify expression
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 5 Nov 2016 14:35:15 +0000 (15:35 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 8 Nov 2016 13:18:03 +0000 (14:18 +0100)
for_each_property_of_node(pins, pp) checks that pp is not NULL.
So there is no need to check it inside the loop.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-st.c

index b926c744193bc98f68fd8ac1faf95a4d7ef2eaba..4f0998b33660e836c9e3f6867feea2e693930f2e 100644 (file)
@@ -1181,7 +1181,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np,
                if (!strcmp(pp->name, "name"))
                        continue;
 
-               if (pp  && (pp->length/sizeof(__be32)) >= OF_GPIO_ARGS_MIN) {
+               if (pp->length / sizeof(__be32) >= OF_GPIO_ARGS_MIN) {
                        npins++;
                } else {
                        pr_warn("Invalid st,pins in %s node\n", np->name);