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 C144C3CFF6F; Tue, 13 Oct 2026 11:51:30 +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=1791892291; cv=none; b=VZEggUoiMDffCT0Nb5d0txQabnt5W6sS7ygNFCqStktFQRSYFwlZADB4iZp1r0QOBd0nAJex2QUFEu5LQPQUv2WM9vgiBlk8Wm4zwUdvNkn+ZS9WFCmPlRe97Isv8sjRJAHihPiXpfPbMgMbmTIC5GIj9G/r2XKk1Lg8jQZwMzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791892291; c=relaxed/simple; bh=UonHo+0jbKNmSVopVsyyrvIlZkVelsfsv7oziEM4CFY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j8bCpSYw2otHFUkgMa52s+0DzMhMhXaAEY6xMhO0BociXNZqX+uGMzDFu78wG3dzdtwWuZBoA+0pWaml6K/BK835tajHo932x5aPvgJpUElNoDPaCqf/sav4e/DymsIoiey746NL6O/Jgy/SdgasatMErNnt/2aX56AKjE86i7s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cK+3BrZ6; 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="cK+3BrZ6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 165EB1F000FF; Tue, 13 Oct 2026 11:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791892290; bh=z9eWmcwPehFpO8JmURN4vFvKtRFNtQehZSvVZgykDbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cK+3BrZ6uSDp2N/Qs7N47D0RBNiOWCoWQCj91JdhOQl18J5yzEEC/tNfzrVrlWfg7 h2AnVu8V23m0rGgZrcvHm9PEgngiXpRwaMHFjYFxnuj7CFOq9839Q49xSw5nFCrxW4 cBAeSNy4NAMYOs6x9L4L0kBACAjdWGbri6K31WEs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Baolin Wang , Adrian Hunter , Ulf Hansson Subject: [PATCH 7.2 080/281] mmc: sdhci-sprd: disable runtime PM on remove Date: Tue, 13 Oct 2026 13:36:36 +0200 Message-ID: <20261013112857.072500308@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112855.045212108@linuxfoundation.org> References: <20261013112855.045212108@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 e1c6c10a6a70a69e29b04fcc1ebe4b9bcbc7a49a upstream. sdhci_sprd_probe() enables runtime PM, while sdhci_sprd_remove() does not perform the corresponding runtime PM cleanup. The probe failure path disables runtime PM before disabling the clocks, but the normal remove path directly disables clocks that are also managed by the runtime PM callbacks. If the device is runtime suspended, those clocks may already be disabled. Resume the device before removal, disable runtime PM and drop the temporary runtime PM reference before disabling the clocks. This issue was found by manual code inspection. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li Reviewed-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-sprd.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -890,6 +890,10 @@ static void sdhci_sprd_remove(struct pla struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); + pm_runtime_get_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); + sdhci_remove_host(host, 0); clk_disable_unprepare(sprd_host->clk_sdio);