diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index f2ae2e563dc54a..3028475f7fba7e 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -1193,8 +1193,10 @@ int w1_process(void *data) */ mutex_unlock(&dev->list_mutex); - if (kthread_should_stop()) + if (kthread_should_stop()) { + __set_current_state(TASK_RUNNING); break; + } /* Only sleep when the search is active. */ if (dev->search_count) {