From 9e69fae1a89e543949fe81603f7229463b8061de Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Thu, 16 May 2013 19:42:58 +0530 Subject: usb: phy: tegra: Return correct error value provided by clk_get_sys In case if clk_get_sys fails, return correct error value provided by the API. Signed-off-by: Venu Byravarasu Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-tegra-usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/usb/phy') diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c index 17d811292f3a..8bcc12f6804a 100644 --- a/drivers/usb/phy/phy-tegra-usb.c +++ b/drivers/usb/phy/phy-tegra-usb.c @@ -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 = -- cgit v1.2.3