From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E592B373BF3; Sat, 12 Sep 2026 07:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789199205; cv=none; b=LED2KaQE7g0j2xqOql5qsTaQf8YdyuE7ObnmRP9eIq0lB6N+pArK7u/U1nsNsVMt4qpKGUnK1QJ2+IG4lBXYh63eCtAg6rym38QjwBcZa0eKIUDm6MkIx+vraxDIpcYSTuN4GKDPKrCT5Fa2nEws2ixAiqwCMjHwSEBfUtXfAUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789199205; c=relaxed/simple; bh=NEiDn2oCtups5jEdBvW0z32XHQ3NFYo8B797cpCRXWg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VWlULUvpfEVLCst0uEJL++TQqM6fbhCY+eYaGH9nZgnp8L4sf6a8N1tD5C/bKjqQ+XHAdJGsLFvDLdjNrmV9tKCCMEXpAUOzZM8K+Y4v8AjZxK3PAcdwkHWXMv/og3QUA4n95AZnOboQyK33xfWL3vKLphmNWqU2uJbB2no4Mr8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=o0bQ2lK5; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="o0bQ2lK5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8B551F000FF; Sat, 12 Sep 2026 07:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789199203; bh=6ZYWyFX22R+R5ZPySACH6R1+pD7ojJreMJebD9wprZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=o0bQ2lK5Pg7Dsayip//9Z9/LzahfjphMi48UpRd5z3DiHAPTL0qZigGyqdvTdCqL1 FTcinELgMBmywQFJ6INjlVEfUX6hpzVaeuAI/PRQc9t1WV0qzFAaQBuiak/XEt8taE T5HHTm9TbsYpMbTFgS5uX7zVf9Z7MSKq0CbRyXqw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Can Peng , Changhuang Liang , Vinod Koul , Sasha Levin Subject: [PATCH 7.2 0536/1815] phy: starfive: Fix runtime PM cleanup in JH7110 DPHY TX probe Date: Sat, 12 Sep 2026 08:38:06 +0200 Message-ID: <20260912065701.462911250@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Can Peng [ Upstream commit f40b0241f3a382e99c14de2f28f14a44973407c1 ] stf_dphy_probe() enables runtime PM before getting the clock and reset controls, creating the PHY and registering the PHY provider. If any of those steps fails, probe returns with runtime PM still enabled. The driver also has no remove callback, so runtime PM is left enabled on driver unbind after a successful probe. Use devm_pm_runtime_enable() so runtime PM is disabled automatically on later probe failures and on driver unbind. Fixes: d3ab79553308 ("phy: starfive: Add mipi dphy tx support") Signed-off-by: Can Peng Reviewed-by: Changhuang Liang Link: https://patch.msgid.link/20260718090054.444513-2-pengcan@kylinos.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/starfive/phy-jh7110-dphy-tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/phy/starfive/phy-jh7110-dphy-tx.c b/drivers/phy/starfive/phy-jh7110-dphy-tx.c index c64d1c91b1307..181491a938079 100644 --- a/drivers/phy/starfive/phy-jh7110-dphy-tx.c +++ b/drivers/phy/starfive/phy-jh7110-dphy-tx.c @@ -392,6 +392,7 @@ static int stf_dphy_probe(struct platform_device *pdev) { struct phy_provider *phy_provider; struct stf_dphy *dphy; + int ret; dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL); if (!dphy) @@ -406,7 +407,9 @@ static int stf_dphy_probe(struct platform_device *pdev) if (IS_ERR(dphy->topsys)) return PTR_ERR(dphy->topsys); - pm_runtime_enable(&pdev->dev); + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret) + return ret; dphy->txesc_clk = devm_clk_get(&pdev->dev, "txesc"); if (IS_ERR(dphy->txesc_clk)) -- 2.53.0