提交 95bdb0ea 编写于 作者: H Heinrich Schuchardt 提交者: Linus Walleij

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: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: NPatrice Chotard <patrice.chotard@st.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 fdcf8355
...@@ -1181,7 +1181,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np, ...@@ -1181,7 +1181,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np,
if (!strcmp(pp->name, "name")) if (!strcmp(pp->name, "name"))
continue; continue;
if (pp && (pp->length/sizeof(__be32)) >= OF_GPIO_ARGS_MIN) { if (pp->length / sizeof(__be32) >= OF_GPIO_ARGS_MIN) {
npins++; npins++;
} else { } else {
pr_warn("Invalid st,pins in %s node\n", np->name); pr_warn("Invalid st,pins in %s node\n", np->name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册