Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754643Ab3EPOXy (ORCPT ); Thu, 16 May 2013 10:23:54 -0400 Received: from hqemgate03.nvidia.com ([216.228.121.140]:11912 "EHLO hqemgate03.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754540Ab3EPOWQ (ORCPT ); Thu, 16 May 2013 10:22:16 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 16 May 2013 07:22:16 -0700 From: Venu Byravarasu To: , , , CC: , , , Venu Byravarasu Subject: [PATCH v4 4/8] usb: phy: tegra: Return correct error value provided by clk_get_sys Date: Thu, 16 May 2013 19:42:58 +0530 Message-ID: <1368713582-29038-5-git-send-email-vbyravarasu@nvidia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1368713582-29038-1-git-send-email-vbyravarasu@nvidia.com> References: <1368713582-29038-1-git-send-email-vbyravarasu@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 32 In case if clk_get_sys fails, return correct error value provided by the API. Signed-off-by: Venu Byravarasu --- delta from v1, v2 & v3: no change. drivers/usb/phy/phy-tegra-usb.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c index 17d8112..8bcc12f 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 = -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/