summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-06-14 12:12:09 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-06-20 11:36:17 +0200
commite7f4c4bf99ad5edca35ccc18105daf5279b54919 (patch)
tree5d6ac44dcaabd583f2880c07a28324cfa5c6ea00 /drivers/pinctrl
parent1bd303dc04c3f744474e77c153575087b657f7e1 (diff)
downloadblackbird-op-linux-e7f4c4bf99ad5edca35ccc18105daf5279b54919.tar.gz
blackbird-op-linux-e7f4c4bf99ad5edca35ccc18105daf5279b54919.zip
pinctrl: ingenic: checking for NULL instead of IS_ERR()
devm_pinctrl_register() returns error pointers, it doesn't return NULL. Fixes: b5c23aa46537 ("pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-ingenic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index d8473d929cb1..d8e8842967d6 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -785,9 +785,9 @@ int ingenic_pinctrl_probe(struct platform_device *pdev)
}
jzpc->pctl = devm_pinctrl_register(dev, pctl_desc, jzpc);
- if (!jzpc->pctl) {
+ if (IS_ERR(jzpc->pctl)) {
dev_err(dev, "Failed to register pinctrl\n");
- return -EINVAL;
+ return PTR_ERR(jzpc->pctl);
}
for (i = 0; i < chip_info->num_groups; i++) {
OpenPOWER on IntegriCloud