From patchwork Sun Jun 27 11:59:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12346755 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 545D2C49EA6 for ; Sun, 27 Jun 2021 11:59:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37610619C6 for ; Sun, 27 Jun 2021 11:59:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbhF0MCD (ORCPT ); Sun, 27 Jun 2021 08:02:03 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:60338 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbhF0MCD (ORCPT ); Sun, 27 Jun 2021 08:02:03 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d79 with ME id NBzd2500E21Fzsu03BzeWK; Sun, 27 Jun 2021 13:59:38 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 27 Jun 2021 13:59:38 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: agross@kernel.org, bjorn.andersson@linaro.org, kishon@ti.com, vkoul@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] phy: qcom-qmp: Fix an error handling path in 'qcom_qmp_phy_power_on()' Date: Sun, 27 Jun 2021 13:59:35 +0200 Message-Id: <3c641172c5b57dce56872d63c52dfae2645cc2d1.1624795081.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org If an error occurs after a successful 'clk_prepare_enable()' call, it must be undone by a 'clk_disable_unprepare()' call, as already done in another error handling path of this function. Update the 'goto' to branch at the correct place of the error handling path. Signed-off-by: Christophe JAILLET --- /!\ This patch is speculative /!\ Review with care. I've not been able to identify a Fixes tag. --- drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index cfe359488f5c..25006d80d347 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -4504,7 +4504,7 @@ static int qcom_qmp_phy_power_on(struct phy *phy) ret = reset_control_deassert(qmp->ufs_reset); if (ret) - goto err_lane_rst; + goto err_pcs_ready; qcom_qmp_phy_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl, cfg->pcs_misc_tbl_num);