diff mbox

[v3,2/2] mmc: sdhci: add regulator disable/put when control error

Message ID 4D9ACC8C.2000202@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jaehoon Chung April 5, 2011, 8:02 a.m. UTC
Missing regulator disable/put. Fixed them.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/mmc/host/sdhci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Wolfram Sang April 8, 2011, 6:38 p.m. UTC | #1
On Tue, Apr 05, 2011 at 05:02:20PM +0900, Jaehoon Chung wrote:
> Missing regulator disable/put. Fixed them.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Looks OK but could be merged into the previous patch.
Jaehoon Chung April 9, 2011, 11:48 a.m. UTC | #2
Hi..

2011/4/9 Wolfram Sang <w.sang@pengutronix.de>:
> On Tue, Apr 05, 2011 at 05:02:20PM +0900, Jaehoon Chung wrote:
>> Missing regulator disable/put. Fixed them.
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> Looks OK but could be merged into the previous patch.

Thanks. :)
yes, i can be merged into the previous patch.
But i think good that  separeted. anyway..don't mind merged or not?

Regards,
Jaehoon Chung

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAk2fViEACgkQD27XaX1/VRt1+wCaAxSjsZ+GqVdhnca16rMsO7LK
> jfcAnjvIvSBSFknx7nMomkT6I4Y1YTgV
> =KfuE
> -----END PGP SIGNATURE-----
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang April 9, 2011, 3:53 p.m. UTC | #3
> > Looks OK but could be merged into the previous patch.
> 
> Thanks. :)
> yes, i can be merged into the previous patch.
> But i think good that  separeted. anyway..don't mind merged or not?

I prefer it merged, because it then fixes all forgotten cleanups in the
error-path in one go.
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1768ffb..35edcc1 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2048,6 +2048,10 @@  reset:
 	sdhci_reset(host, SDHCI_RESET_ALL);
 	free_irq(host->irq, host);
 	del_timer_sync(&host->timer);
+	if (host->vmmc) {
+		regulator_disable(host->vmmc);
+		regulator_put(host->vmmc);
+	}
 
 untasklet:
 	tasklet_kill(&host->card_tasklet);