summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-st.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2016-11-05 17:35:15 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-11-08 16:18:03 +0300
commit95bdb0ea3668d86513376e0e88e88f5c0202acba (patch)
treefa75ff897af3d093d16587a45e0d0f3b4bd22f66 /drivers/pinctrl/pinctrl-st.c
parentfdcf83552ab1051f3a0b71a7d5c2e242f97b4157 (diff)
downloadlinux-95bdb0ea3668d86513376e0e88e88f5c0202acba.tar.xz
pinctrl: st: st_pctl_dt_parse_groups simplify expression
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-st.c')
-rw-r--r--drivers/pinctrl/pinctrl-st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index b926c744193b..4f0998b33660 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -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);