diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/mei/init.c | 2 | ||||
-rw-r--r-- | drivers/staging/mei/wd.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/mei/init.c b/drivers/staging/mei/init.c index d1ffa32cd141..685fcf639644 100644 --- a/drivers/staging/mei/init.c +++ b/drivers/staging/mei/init.c | |||
@@ -189,7 +189,7 @@ int mei_hw_init(struct mei_device *dev) | |||
189 | mutex_lock(&dev->device_lock); | 189 | mutex_lock(&dev->device_lock); |
190 | } | 190 | } |
191 | 191 | ||
192 | if (!err && !dev->recvd_msg) { | 192 | if (err <= 0 && !dev->recvd_msg) { |
193 | dev->mei_state = MEI_DISABLED; | 193 | dev->mei_state = MEI_DISABLED; |
194 | dev_dbg(&dev->pdev->dev, | 194 | dev_dbg(&dev->pdev->dev, |
195 | "wait_event_interruptible_timeout failed" | 195 | "wait_event_interruptible_timeout failed" |
diff --git a/drivers/staging/mei/wd.c b/drivers/staging/mei/wd.c index 2564b038636a..fff53d0b5c6e 100644 --- a/drivers/staging/mei/wd.c +++ b/drivers/staging/mei/wd.c | |||
@@ -169,10 +169,15 @@ int mei_wd_stop(struct mei_device *dev, bool preserve) | |||
169 | ret = wait_event_interruptible_timeout(dev->wait_stop_wd, | 169 | ret = wait_event_interruptible_timeout(dev->wait_stop_wd, |
170 | dev->wd_stopped, 10 * HZ); | 170 | dev->wd_stopped, 10 * HZ); |
171 | mutex_lock(&dev->device_lock); | 171 | mutex_lock(&dev->device_lock); |
172 | if (!dev->wd_stopped) | 172 | if (dev->wd_stopped) { |
173 | dev_dbg(&dev->pdev->dev, "stop wd failed to complete.\n"); | 173 | dev_dbg(&dev->pdev->dev, "stop wd complete ret=%d.\n", ret); |
174 | else | 174 | ret = 0; |
175 | dev_dbg(&dev->pdev->dev, "stop wd complete.\n"); | 175 | } else { |
176 | if (!ret) | ||
177 | ret = -ETIMEDOUT; | ||
178 | dev_warn(&dev->pdev->dev, | ||
179 | "stop wd failed to complete ret=%d.\n", ret); | ||
180 | } | ||
176 | 181 | ||
177 | if (preserve) | 182 | if (preserve) |
178 | dev->wd_timeout = wd_timeout; | 183 | dev->wd_timeout = wd_timeout; |