Skip to content

Commit 58abdd8

Browse files
bbkzzstorulf
authored andcommitted
mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove
The order of function calls in sdhci_f_sdh30_remove is wrong, let's call sdhci_pltfm_unregister first. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Fixes: 5def5c1 ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm") Signed-off-by: Yangtao Li <frank.li@vivo.com> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230727070051.17778-62-frank.li@vivo.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent cf3f15b commit 58abdd8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

drivers/mmc/host/sdhci_f_sdh30.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,16 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev)
210210
{
211211
struct sdhci_host *host = platform_get_drvdata(pdev);
212212
struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host);
213-
214-
reset_control_assert(priv->rst);
215-
clk_disable_unprepare(priv->clk);
216-
clk_disable_unprepare(priv->clk_iface);
213+
struct clk *clk_iface = priv->clk_iface;
214+
struct reset_control *rst = priv->rst;
215+
struct clk *clk = priv->clk;
217216

218217
sdhci_pltfm_unregister(pdev);
219218

219+
reset_control_assert(rst);
220+
clk_disable_unprepare(clk);
221+
clk_disable_unprepare(clk_iface);
222+
220223
return 0;
221224
}
222225

0 commit comments

Comments
 (0)