pinctrl: pinctrl-st.c: Cleaning up if unsigned is less than zero
Remove checking if a unsigned is less than zero This was found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
5aa498b954
commit
8b0c107ce0
@ -1250,7 +1250,7 @@ static int st_pctl_parse_functions(struct device_node *np,
|
|||||||
func = &info->functions[index];
|
func = &info->functions[index];
|
||||||
func->name = np->name;
|
func->name = np->name;
|
||||||
func->ngroups = of_get_child_count(np);
|
func->ngroups = of_get_child_count(np);
|
||||||
if (func->ngroups <= 0) {
|
if (func->ngroups == 0) {
|
||||||
dev_err(info->dev, "No groups defined\n");
|
dev_err(info->dev, "No groups defined\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user