Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}

+1 −1
Original line number Diff line number Diff line
@@ -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;
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}
	}