Commit 2d4d5481 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

mei: fix return value on disconnection

Correct errno on client disconnection is -ENODEV not -EBUSY

Cc: <stable@vger.kernel.org> #4.3+
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1eb5bd4d
......@@ -132,7 +132,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
return -ERESTARTSYS;
if (!mei_cl_is_connected(cl)) {
rets = -EBUSY;
rets = -ENODEV;
goto out;
}
......
......@@ -143,7 +143,7 @@ ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length)
mutex_lock(&bus->device_lock);
if (!mei_cl_is_connected(cl)) {
rets = -EBUSY;
rets = -ENODEV;
goto out;
}
}
......
......@@ -203,7 +203,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
mutex_lock(&dev->device_lock);
if (!mei_cl_is_connected(cl)) {
rets = -EBUSY;
rets = -ENODEV;
goto out;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment