diff mbox series

[1/5,v7] memstick: rtsx_usb_ms: Add missing pm_runtime_disable() in probe function

Message ID 20181105084506.6476-2-kai.heng.feng@canonical.com (mailing list archive)
State New, archived
Headers show
Series Keep rtsx_usb suspended when there's no card | expand

Commit Message

Kai-Heng Feng Nov. 5, 2018, 8:45 a.m. UTC
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>
---
 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;
 }