summaryrefslogtreecommitdiff
path: root/drivers/memstick
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2020-09-28 13:17:36 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2020-09-28 13:17:36 +0300
commit21685f9a7d7cdb3f68d83352377571fb24d03134 (patch)
tree73effe4466ee700fa85be940a00bd03785faf6fb /drivers/memstick
parent94d4c3cffefc702da2f906bfc68b774659f1c8fc (diff)
parentafd7f30886b0b445a4240a99020458a9772f2b89 (diff)
downloadlinux-21685f9a7d7cdb3f68d83352377571fb24d03134.tar.xz
Merge branch 'fixes' into next
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/memstick.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index 693ee73eb291..ef03d6fafc5c 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -441,6 +441,9 @@ static void memstick_check(struct work_struct *work)
} else if (host->card->stop)
host->card->stop(host->card);
+ if (host->removing)
+ goto out_power_off;
+
card = memstick_alloc_card(host);
if (!card) {
@@ -545,6 +548,7 @@ EXPORT_SYMBOL(memstick_add_host);
*/
void memstick_remove_host(struct memstick_host *host)
{
+ host->removing = 1;
flush_workqueue(workqueue);
mutex_lock(&host->lock);
if (host->card)