[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230726040041.26267-60-frank.li@vivo.com>
Date: Wed, 26 Jul 2023 12:00:40 +0800
From: Yangtao Li <frank.li@...o.com>
To: Adrian Hunter <adrian.hunter@...el.com>,
Ulf Hansson <ulf.hansson@...aro.org>
Cc: Yangtao Li <frank.li@...o.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 60/61] mmc: sdhci_am654: Properly handle failures in .remove()
Returning an error code in a platform driver's remove function is wrong
most of the time and there is an effort to make the callback return
void. To prepare this rework the function not to exit early.
Cc: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
drivers/mmc/host/sdhci_am654.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index 7cdf0f54e3a5..abe83736d396 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -873,8 +873,7 @@ static int sdhci_am654_remove(struct platform_device *pdev)
int ret;
ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret < 0)
- return ret;
+ WARN_ON(ret < 0);
sdhci_remove_host(host, true);
clk_disable_unprepare(pltfm_host->clk);
--
2.39.0
Powered by blists - more mailing lists