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

pinctrl: pinctrl-imx.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
9eedfd68 ca7162ad

+1 -1
+1 -1
drivers/pinctrl/pinctrl-imx.c
··· 515 515 /* Initialise function */ 516 516 func->name = np->name; 517 517 func->num_groups = of_get_child_count(np); 518 - if (func->num_groups <= 0) { 518 + if (func->num_groups == 0) { 519 519 dev_err(info->dev, "no groups defined in %s\n", np->full_name); 520 520 return -EINVAL; 521 521 }