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 012474E01E3; Wed, 30 Sep 2026 15:54:13 +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=1790783658; cv=none; b=Iow4X40Y8x/QBZNPxPlMM8hBJ80PR8AW0jLP2JJnahRzvyUk+NOWy3VDd/o5MaYZm6PeBf0Ok0M4zkJO7av2ICob5ayU81mcfnrxUITQnfONunao26P7G6QpIUEqahwKjPp7SnlkhEsx7KUK8G4UjcUsESAgPfydW1k0ASo6RyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790783658; c=relaxed/simple; bh=d79W3Ws6wz0YMDz+rlEBvzV4euzxlGJnkzBNq44hcTc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DjpmggsuFNYNrjmFI6vKwNKSerfu5cwNx5AmEVn6z94Nq6lNTMNf1D5O5j+3LZVDL+gt2TEiR70RFnBLT/R+IAm3kG0R+A8OhlgfP75VPIm0UhTwkBIAyhFKbCArgTVGP1xoD9KapgUFf9zwqZv8tesfFLNb6uuJFO0GiuUoBuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tp6GkaNo; 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="tp6GkaNo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C80D1F00893; Wed, 30 Sep 2026 15:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790783653; bh=CotA1vGmqjCs4rkeessdzY7JNPXKHmmI161orJdg0HE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tp6GkaNo5gaiziG33sHLtbBgFmCzuYF59SHT7TEVwAQwUS/No+68Gj/lzp5T3Q5Qr FbEEquIoISI0xSMhiCGEghJ9Wg/xe3ENHXXQ8+ColQrZUfsj9V+YW+HqrVCjjAxJV9 DPfWurMTwjqayUg3OW/wxvksolveUetpiXbVlk+I= 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 5.10 475/595] drm/msm/hdmi_phy: fix runtime PM cleanup on probe failure Date: Wed, 30 Sep 2026 17:26:08 +0200 Message-ID: <20260930152357.898511572@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152347.700140858@linuxfoundation.org> References: <20260930152347.700140858@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 5.10-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 @@ -169,13 +169,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); @@ -183,6 +183,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 int msm_hdmi_phy_remove(struct platform_device *pdev)