From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 552DBC7EE23 for ; Mon, 5 Jun 2023 19:53:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234584AbjFETxZ (ORCPT ); Mon, 5 Jun 2023 15:53:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbjFETxY (ORCPT ); Mon, 5 Jun 2023 15:53:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94B03E54 for ; Mon, 5 Jun 2023 12:53:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D3827620F6 for ; Mon, 5 Jun 2023 19:52:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2A59C433EF; Mon, 5 Jun 2023 19:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1685994750; bh=NN9a+A0+4FDfdRdM0xdqlx7E0+duHXUPC2XNmwyLr+A=; h=Subject:To:Cc:From:Date:From; b=dKCpIEUps6Qx7a4EK4tT2f5LZDcW2tfm1pdNjnLo05UuH7+dxGnLd/gZ4AVCuwHmJ tk3IbzFihdgH4zqZpCCvNBkjnp3YNIvCv83KtsHB+sz1S/fGXYDwuFecRTGNGVKAKo 0bO7G8tdYVQgZGQeU0mHDZPgTpWiRiCPoF23eVxI= Subject: FAILED: patch "[PATCH] phy: qcom-qmp-pcie-msm8996: fix init-count imbalance" failed to apply to 5.10-stable tree To: johan+linaro@kernel.org, dmitry.baryshkov@linaro.org, vkoul@kernel.org Cc: From: Date: Mon, 05 Jun 2023 21:52:25 +0200 Message-ID: <2023060524-satin-contented-0ea3@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x e42f110700ed7293700c26145e1ed07ea05ac3f6 # git commit -s git send-email --to '' --in-reply-to '2023060524-satin-contented-0ea3@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: e42f110700ed ("phy: qcom-qmp-pcie-msm8996: fix init-count imbalance") 94a407cc17a4 ("phy: qcom-qmp: create copies of QMP PHY driver") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From e42f110700ed7293700c26145e1ed07ea05ac3f6 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 2 May 2023 12:38:10 +0200 Subject: [PATCH] phy: qcom-qmp-pcie-msm8996: fix init-count imbalance The init counter is not decremented on initialisation errors, which prevents retrying initialisation. Add the missing decrement on initialisation errors so that the counter reflects the state of the device. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: stable@vger.kernel.org # 4.12 Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230502103810.12061-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 09824be088c9..0c603bc06e09 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -379,7 +379,7 @@ static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy) ret = regulator_bulk_enable(cfg->num_vregs, qmp->vregs); if (ret) { dev_err(qmp->dev, "failed to enable regulators, err=%d\n", ret); - goto err_unlock; + goto err_decrement_count; } ret = reset_control_bulk_assert(cfg->num_resets, qmp->resets); @@ -409,7 +409,8 @@ static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy) reset_control_bulk_assert(cfg->num_resets, qmp->resets); err_disable_regulators: regulator_bulk_disable(cfg->num_vregs, qmp->vregs); -err_unlock: +err_decrement_count: + qmp->init_count--; mutex_unlock(&qmp->phy_mutex); return ret;