Skip to content

Commit

Permalink
pinctrl: pinctrl-at91.c: Cleaning up if unsigned is less than zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rickard Strandqvist authored and Linus Walleij committed Jul 11, 2014
1 parent 8708ebc commit ca7162a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ static int at91_pinctrl_parse_functions(struct device_node *np,
/* Initialise function */
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;
}
Expand Down

0 comments on commit ca7162a

Please sign in to comment.