Skip to content

Commit

Permalink
pinctrl: samsung: Update error check for unsigned variables
Browse files Browse the repository at this point in the history
Checking '< 0' for unsigned variables always returns false. For error
codes, use IS_ERR_VALUE() instead.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Tushar Behera authored and Kukjin Kim committed Nov 19, 2012
1 parent 6edc794 commit 4a991b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev,
const char *pin_name;

*npins = of_property_count_strings(cfg_np, "samsung,pins");
if (*npins < 0) {
if (IS_ERR_VALUE(*npins)) {
dev_err(dev, "invalid pin list in %s node", cfg_np->name);
return -EINVAL;
}
Expand Down

0 comments on commit 4a991b4

Please sign in to comment.