diff mbox series

[08/12,SRU,B,C,D,OEM-B] memstick: rtsx_usb_ms: Add missing pm_runtime_disable() in probe function

Message ID 20190111083019.32135-9-acelan.kao@canonical.com
State Accepted
Headers show
Series To reduce the Realtek USB cardreader power consumption | expand

Commit Message

AceLan Kao Jan. 11, 2019, 8:30 a.m. UTC
From: Kai-Heng Feng <kai.heng.feng@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1811337

If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Add missing pm_runtime_disable() for rtsx_usb_ms.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 01a7e8e066a505933b43a8df6da1ae1a1e7bddf2)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/memstick/host/rtsx_usb_ms.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/memstick/host/rtsx_usb_ms.c b/drivers/memstick/host/rtsx_usb_ms.c
index 4f64563df7de..e95e64974a91 100644
--- a/drivers/memstick/host/rtsx_usb_ms.c
+++ b/drivers/memstick/host/rtsx_usb_ms.c
@@ -770,6 +770,7 @@  static int rtsx_usb_ms_drv_probe(struct platform_device *pdev)
 	return 0;
 err_out:
 	memstick_free_host(msh);
+	pm_runtime_disable(ms_dev(host));
 	return err;
 }