]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drivers/memstick/host/rtsx_pci_ms.c: add cancel_work when remove driver
authorMicky Ching <micky_ching@realsil.com.cn>
Mon, 23 Jun 2014 20:22:04 +0000 (13:22 -0700)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:45:04 +0000 (18:45 +0100)
commit b6226b45c66196e14ef628d3aead2139700db1ad upstream.

Add cancel_work_sync() in rtsx_pci_ms_drv_remove() to cancel pending
request work when removing the driver.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Cc: Samuel Ortiz <sameo@linux.intel.com> says:
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Roger Tseng <rogerable@realtek.com>
Cc: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/memstick/host/rtsx_pci_ms.c

index 25f8f93decb6e0c97267ed00609b35f881634519..8d70fcf18901360486752a03a42c64fd9b271fb6 100644 (file)
@@ -591,6 +591,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) {