From: Micky Ching <[email protected]>

Add cancel_work_sync() in rtsx_pci_ms_drv_remove(). Using
cancel_work_sync() to cancel pending request handle work when remove
driver.

Signed-off-by: Micky Ching <[email protected]>
---
 drivers/memstick/host/rtsx_pci_ms.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/memstick/host/rtsx_pci_ms.c 
b/drivers/memstick/host/rtsx_pci_ms.c
index 2a635b6..c880ba6 100644
--- a/drivers/memstick/host/rtsx_pci_ms.c
+++ b/drivers/memstick/host/rtsx_pci_ms.c
@@ -601,6 +601,7 @@ static int rtsx_pci_ms_drv_remove(struct platform_device 
*pdev)
        pcr->slots[RTSX_MS_CARD].card_event = NULL;
        msh = host->msh;
        host->eject = true;
+       cancel_work_sync(&host->handle_req);
 
        mutex_lock(&host->host_mutex);
        if (host->req) {
-- 
1.7.9.5

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to