summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/main.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-03-27 00:27:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-03 16:18:56 +0200
commit6a84d63d22a0ac79ab422b69ef2b4d75002c5641 (patch)
tree0272d21b8d66df5759a2c8e0f0d0a18f90ec812a /drivers/misc/mei/main.c
parentf3de9b635d93a3d268adda428e1df94091506a42 (diff)
downloadlwn-6a84d63d22a0ac79ab422b69ef2b4d75002c5641.tar.gz
lwn-6a84d63d22a0ac79ab422b69ef2b4d75002c5641.zip
mei: replace check for connection instead of transitioning
The function mei_cl_is_transitioning is just opposite of mei_cl_is_connected. What we actually wanted to check is if we lost connection so we can discard the check for transition and check for 'not connected' Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r--drivers/misc/mei/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 29fa88b6fa17..7f77f39c24a7 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -203,7 +203,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
if (wait_event_interruptible(cl->rx_wait,
(!list_empty(&cl->rd_completed)) ||
- mei_cl_is_transitioning(cl))) {
+ (!mei_cl_is_connected(cl)))) {
if (signal_pending(current))
return -EINTR;
@@ -211,7 +211,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
}
mutex_lock(&dev->device_lock);
- if (mei_cl_is_transitioning(cl)) {
+ if (!mei_cl_is_connected(cl)) {
rets = -EBUSY;
goto out;
}