usb: phy: tegra: Return correct error value provided by clk_get_sys
authorVenu Byravarasu <vbyravarasu@nvidia.com>
Thu, 16 May 2013 14:12:58 +0000 (19:42 +0530)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 May 2013 23:45:44 +0000 (02:45 +0300)
In case if clk_get_sys fails, return correct error value provided by
the API.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-tegra-usb.c

index 17d8112..8bcc12f 100644 (file)
@@ -620,8 +620,7 @@ static int  tegra_phy_init(struct usb_phy *x)
                phy->clk = clk_get_sys(NULL, ulpi_config->clk);
                if (IS_ERR(phy->clk)) {
                        pr_err("%s: can't get ulpi clock\n", __func__);
-                       err = -ENXIO;
-                       goto err1;
+                       return PTR_ERR(phy->clk);
                }
                if (!gpio_is_valid(ulpi_config->reset_gpio))
                        ulpi_config->reset_gpio =