From 1c986a34d175fbf2d7e2e9bfe87b98b712b6fa27 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 21 Aug 2023 21:03:27 +0200 Subject: [PATCH] 5.10-stable patches added patches: mmc-f-sdh30-fix-order-of-function-calls-in-sdhci_f_sdh30_remove.patch --- ...nction-calls-in-sdhci_f_sdh30_remove.patch | 49 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 50 insertions(+) create mode 100644 queue-5.10/mmc-f-sdh30-fix-order-of-function-calls-in-sdhci_f_sdh30_remove.patch diff --git a/queue-5.10/mmc-f-sdh30-fix-order-of-function-calls-in-sdhci_f_sdh30_remove.patch b/queue-5.10/mmc-f-sdh30-fix-order-of-function-calls-in-sdhci_f_sdh30_remove.patch new file mode 100644 index 00000000000..3ec69d77fa0 --- /dev/null +++ b/queue-5.10/mmc-f-sdh30-fix-order-of-function-calls-in-sdhci_f_sdh30_remove.patch @@ -0,0 +1,49 @@ +From 58abdd80b93b09023ca03007b608685c41e3a289 Mon Sep 17 00:00:00 2001 +From: Yangtao Li +Date: Thu, 27 Jul 2023 15:00:51 +0800 +Subject: mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Yangtao Li + +commit 58abdd80b93b09023ca03007b608685c41e3a289 upstream. + +The order of function calls in sdhci_f_sdh30_remove is wrong, +let's call sdhci_pltfm_unregister first. + +Cc: Uwe Kleine-König +Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm") +Signed-off-by: Yangtao Li +Reported-by: Uwe Kleine-König +Acked-by: Uwe Kleine-König +Acked-by: Adrian Hunter +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20230727070051.17778-62-frank.li@vivo.com +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/sdhci_f_sdh30.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/mmc/host/sdhci_f_sdh30.c ++++ b/drivers/mmc/host/sdhci_f_sdh30.c +@@ -188,12 +188,14 @@ static int sdhci_f_sdh30_remove(struct p + { + struct sdhci_host *host = platform_get_drvdata(pdev); + struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); +- +- clk_disable_unprepare(priv->clk_iface); +- clk_disable_unprepare(priv->clk); ++ struct clk *clk_iface = priv->clk_iface; ++ struct clk *clk = priv->clk; + + sdhci_pltfm_unregister(pdev); + ++ clk_disable_unprepare(clk_iface); ++ clk_disable_unprepare(clk); ++ + return 0; + } + diff --git a/queue-5.10/series b/queue-5.10/series index f6fcf3f0dc0..e346dd79d6c 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -122,3 +122,4 @@ netfilter-set-default-timeout-to-3-secs-for-sctp-shutdown-send-and-recv-state.pa af_unix-fix-null-ptr-deref-in-unix_stream_sendpage.patch virtio-net-set-queues-after-driver_ok.patch net-fix-the-rto-timer-retransmitting-skb-every-1ms-if-linear-option-is-enabled.patch +mmc-f-sdh30-fix-order-of-function-calls-in-sdhci_f_sdh30_remove.patch -- 2.47.3