1
0
Fork 0

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>
hifive-unleashed-5.1
Rickard Strandqvist 2014-06-26 13:32:49 +02:00 committed by Linus Walleij
parent 5aa498b954
commit 8b0c107ce0
1 changed files with 1 additions and 1 deletions

View File

@ -1250,7 +1250,7 @@ static int st_pctl_parse_functions(struct device_node *np,
func = &info->functions[index];
func->name = np->name;
func->ngroups = of_get_child_count(np);
if (func->ngroups <= 0) {
if (func->ngroups == 0) {
dev_err(info->dev, "No groups defined\n");
return -EINVAL;
}