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 D0ACD3A255A; Wed, 23 Sep 2026 14:34:49 +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=1790174090; cv=none; b=G0xINTrINrbrwlrkkczKIAQPkEeAr367/SqD81GHezYriJRWErxWDtUhSXtw7AfPGu2bnevPkzewQDc2jr0VmLpESa8aIYuYuV91DjwL52LO7dBtSWsxdMVwMm7Dy8qQaX+BRtb/7i+ZXx8DM39L7n3PCeP4loW4+DnF6Jxl9Hg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790174090; c=relaxed/simple; bh=63AlFmqNd9vWmY4quN7+eg0NPByUVJA43vqiXFncV3s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cp5jDtkTQMFAjazeDbsKTGsurwIKdkJNA+4aXY3xZ+lh40f2kU2O4Fs/8lo4UN3s4AaMdGmwCi6pOu2kFUg8D7RJCnKvxXlvYLhvjIiFKgH4Z24XwiIfZWkmsOaKyopIUhO3VYQqqYmRNaQC5X8bAYJi04ADTIfH8pNzCKMpJl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l0ttMn7K; 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="l0ttMn7K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D11C1F00898; Wed, 23 Sep 2026 14:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790174089; bh=QSrgalsERJRRmfEu3g09jxyAA5CNsB/GAx3+I580+8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=l0ttMn7KTlqs2akQiiXwqWT9qZ9e1Pl6X9GcwS3hbJYiMkCZbgIhna6HGa08euRVC FP3bRdgt1YV+n0J4pYibCgZ+5CAKVIhhAkdqCFIDEHRMqMXLZHIdbx8/TP/kp5M9Jn 8Y9drZlWMpmQUdDZoO921WMbOKigi7zyyOfE5UUo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Krzysztof Kozlowski , Dmitry Baryshkov Subject: [PATCH 7.2 404/438] drm/msm/hdmi_phy: fix runtime PM cleanup on probe failure Date: Wed, 23 Sep 2026 16:07:05 +0200 Message-ID: <20260923140655.366455158@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923140644.756254324@linuxfoundation.org> References: <20260923140644.756254324@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: Guangshuo Li commit f4fae975db08a9aeec0b15e145c7d4d0fe02a0ec upstream. msm_hdmi_phy_probe() enables runtime PM before enabling the PHY resources and initializing the PLL, but failures from either operation return without calling the matching pm_runtime_disable(). The remove path disables runtime PM, but it is not called when probe fails. As a result, runtime PM remains enabled after an unsuccessful probe. Route failures after pm_runtime_enable() through a common error path and disable runtime PM before returning. This issue was found by manual code inspection. Fixes: 15b4a4523859 ("drm/msm/hdmi: Create a separate HDMI PHY driver") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/753043/ Link: https://lore.kernel.org/r/20260913085814.1509352-1-lgs201920130244@gmail.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c @@ -168,13 +168,13 @@ static int msm_hdmi_phy_probe(struct pla ret = msm_hdmi_phy_resource_enable(phy); if (ret) - return ret; + goto err_pm_disable; ret = msm_hdmi_phy_pll_init(pdev, phy->cfg->type); if (ret) { DRM_DEV_ERROR(dev, "couldn't init PLL\n"); msm_hdmi_phy_resource_disable(phy); - return ret; + goto err_pm_disable; } msm_hdmi_phy_resource_disable(phy); @@ -182,6 +182,10 @@ static int msm_hdmi_phy_probe(struct pla platform_set_drvdata(pdev, phy); return 0; + +err_pm_disable: + pm_runtime_disable(dev); + return ret; } static void msm_hdmi_phy_remove(struct platform_device *pdev)