diff options
Diffstat (limited to 'drivers/pinctrl/samsung')
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-exynos5440.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-samsung.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c index 86192be3b679..f5619fb50447 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos5440.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos5440.c @@ -822,9 +822,9 @@ static int exynos5440_pinctrl_register(struct platform_device *pdev, return ret; pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, priv); - if (!pctl_dev) { + if (IS_ERR(pctl_dev)) { dev_err(&pdev->dev, "could not register pinctrl driver\n"); - return -EINVAL; + return PTR_ERR(pctl_dev); } grange.name = "exynos5440-pctrl-gpio-range"; diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index ed165ba2eb2f..3dd5a3b2ac62 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -806,7 +806,7 @@ static int samsung_pinctrl_parse_dt(struct platform_device *pdev, functions = samsung_pinctrl_create_functions(dev, drvdata, &func_cnt); if (IS_ERR(functions)) { dev_err(dev, "failed to parse pin functions\n"); - return PTR_ERR(groups); + return PTR_ERR(functions); } drvdata->pin_groups = groups; @@ -873,9 +873,9 @@ static int samsung_pinctrl_register(struct platform_device *pdev, return ret; drvdata->pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, drvdata); - if (!drvdata->pctl_dev) { + if (IS_ERR(drvdata->pctl_dev)) { dev_err(&pdev->dev, "could not register pinctrl driver\n"); - return -EINVAL; + return PTR_ERR(drvdata->pctl_dev); } for (bank = 0; bank < drvdata->nr_banks; ++bank) { |