diff options
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r-- | drivers/w1/w1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 7994d933f040..7ce277d2bb67 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -924,7 +924,8 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb | |||
924 | tmp64 = (triplet_ret >> 2); | 924 | tmp64 = (triplet_ret >> 2); |
925 | rn |= (tmp64 << i); | 925 | rn |= (tmp64 << i); |
926 | 926 | ||
927 | if (kthread_should_stop()) { | 927 | /* ensure we're called from kthread and not by netlink callback */ |
928 | if (!dev->priv && kthread_should_stop()) { | ||
928 | mutex_unlock(&dev->bus_mutex); | 929 | mutex_unlock(&dev->bus_mutex); |
929 | dev_dbg(&dev->dev, "Abort w1_search\n"); | 930 | dev_dbg(&dev->dev, "Abort w1_search\n"); |
930 | return; | 931 | return; |