summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-07-31 19:23:08 +0400
committerLinus Walleij <linus.walleij@linaro.org>2014-08-17 18:15:44 +0400
commit8a3cfb7c1700732df9fc13439b313bf8db39fefd (patch)
tree694477f32fe7da09c1470d7521bd1408cdb29995 /drivers/pinctrl
parent8e1594db7e43eaf4ea88b870e97fa3ab9f8f98e0 (diff)
downloadlinux-8a3cfb7c1700732df9fc13439b313bf8db39fefd.tar.xz
pinctrl: tegra-xusb: testing wrong variable in probe()
There is a cut and paste bug so we test the wrong variable. "err" is never less than zero at this point. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-tegra-xusb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c b/drivers/pinctrl/pinctrl-tegra-xusb.c
index 419a047b9150..e641b4226c42 100644
--- a/drivers/pinctrl/pinctrl-tegra-xusb.c
+++ b/drivers/pinctrl/pinctrl-tegra-xusb.c
@@ -930,7 +930,8 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
padctl->provider = devm_of_phy_provider_register(&pdev->dev,
tegra_xusb_padctl_xlate);
- if (err < 0) {
+ if (IS_ERR(padctl->provider)) {
+ err = PTR_ERR(padctl->provider);
dev_err(&pdev->dev, "failed to register PHYs: %d\n", err);
goto unregister;
}