summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-pistachio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-pistachio.c')
-rw-r--r--drivers/pinctrl/pinctrl-pistachio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-pistachio.c b/drivers/pinctrl/pinctrl-pistachio.c
index 079ce8b..63100be 100644
--- a/drivers/pinctrl/pinctrl-pistachio.c
+++ b/drivers/pinctrl/pinctrl-pistachio.c
@@ -1474,9 +1474,9 @@ static int pistachio_pinctrl_probe(struct platform_device *pdev)
pctl->pctldev = pinctrl_register(&pistachio_pinctrl_desc, &pdev->dev,
pctl);
- if (!pctl->pctldev) {
+ if (IS_ERR(pctl->pctldev)) {
dev_err(&pdev->dev, "Failed to register pinctrl device\n");
- return -EINVAL;
+ return PTR_ERR(pctl->pctldev);
}
ret = pistachio_gpio_register(pctl);