pinctrl: tegra-xusb: testing wrong variable in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 31 Jul 2014 15:23:08 +0000 (18:23 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 17 Aug 2014 14:15:44 +0000 (09:15 -0500)
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>
drivers/pinctrl/pinctrl-tegra-xusb.c

index 419a047..e641b42 100644 (file)
@@ -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;
        }