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: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1eb5bd4d83
commit
2d4d5481e2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue