Skip to content

Commit

Permalink
pinctrl: pinctrl-imx1-core.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 9eedfd6 commit 5aa498b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-imx1-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static int imx1_pinctrl_parse_functions(struct device_node *np,
/* Initialise function */
func->name = np->name;
func->num_groups = of_get_child_count(np);
if (func->num_groups <= 0)
if (func->num_groups == 0)
return -EINVAL;

func->groups = devm_kzalloc(info->dev,
Expand Down

0 comments on commit 5aa498b

Please sign in to comment.