Skip to content

Commit

Permalink
drivers/memstick/host/rtsx_pci_ms.c: add cancel_work when remove driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Micky Ching authored and Linus Torvalds committed Jun 23, 2014
1 parent 7cd2b0a commit b6226b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/memstick/host/rtsx_pci_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b6226b4

Please sign in to comment.