aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-11-19 09:45:19 +0900
committerKukjin Kim <kgene.kim@samsung.com>2012-11-19 10:03:35 +0900
commit4a991b410cd7940c48f261e854e8698923e23fd2 (patch)
tree0c88407553fd49054c1701fe9a156e573dd3bb0e /drivers/pinctrl
parent6edc794a5ff245faf60488d32e9fdbeb0aad2223 (diff)
pinctrl: samsung: Update error check for unsigned variables
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-samsung.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index 81c9896d4f6..3b52c17c4fd 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -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;
}