Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: pinctrl-at91.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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Rickard Strandqvist and committed by
Linus Walleij
ca7162ad 8708ebca

+1 -1
+1 -1
drivers/pinctrl/pinctrl-at91.c
··· 924 924 /* Initialise function */ 925 925 func->name = np->name; 926 926 func->ngroups = of_get_child_count(np); 927 - if (func->ngroups <= 0) { 927 + if (func->ngroups == 0) { 928 928 dev_err(info->dev, "no groups defined\n"); 929 929 return -EINVAL; 930 930 }