Skip to contentSkip to conversation

memorystick: rtsx: add cancel_work when remove driver

PATCH New [email protected] 1 participant 1 message Jun 5, 2014 Sony memorystick

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memorystick: rtsx: add cancel_work when remove driver

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.

---
 drivers/memstick/host/rtsx_pci_ms.c |    1 +
 1 file changed, 1 insertion(+)
drivers/memstick/host/rtsx_pci_ms.c +1 -0
index 2a635b6..c880ba6 100644
@@ -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) {
Signature · 1 line
1.7.9.5