From: Micky Ching Date: Mon, 23 Jun 2014 20:22:04 +0000 (-0700) Subject: drivers/memstick/host/rtsx_pci_ms.c: add cancel_work when remove driver X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b6226b45c66196e14ef628d3aead2139700db1ad;p=deliverable%2Flinux.git drivers/memstick/host/rtsx_pci_ms.c: add cancel_work when remove driver Add cancel_work_sync() in rtsx_pci_ms_drv_remove() to cancel pending request work when removing the driver. Signed-off-by: Micky Ching Cc: Samuel Ortiz says: Cc: Maxim Levitsky Cc: Greg Kroah-Hartman Cc: Alex Dubov Cc: Roger Tseng Cc: Wei WANG Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/memstick/host/rtsx_pci_ms.c b/drivers/memstick/host/rtsx_pci_ms.c index 2a635b6fdaf7..c880ba685754 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) {