summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-07-31 18:23:08 +0300
committerLinus Walleij <linus.walleij@linaro.org>2014-08-17 09:15:44 -0500
commit8a3cfb7c1700732df9fc13439b313bf8db39fefd (patch)
tree694477f32fe7da09c1470d7521bd1408cdb29995
parent8e1594db7e43eaf4ea88b870e97fa3ab9f8f98e0 (diff)
downloadop-kernel-dev-8a3cfb7c1700732df9fc13439b313bf8db39fefd.zip
op-kernel-dev-8a3cfb7c1700732df9fc13439b313bf8db39fefd.tar.gz
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>
-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 419a047..e641b42 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;
}
OpenPOWER on IntegriCloud