Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1424144 > unrolled thread

[char-misc-next 4/8] mei: fix return value on disconnection

Started byTomas Winkler <tomas.winkler@intel.com>
First post2016-06-16 17:00 +0200
Last post2016-06-22 23:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [char-misc-next 4/8] mei: fix return value on disconnection Tomas Winkler <tomas.winkler@intel.com> - 2016-06-16 17:00 +0200
    [char-misc-next v2 4/8] mei: fix return value on disconnection Tomas Winkler <tomas.winkler@intel.com> - 2016-06-22 23:30 +0200

#1424144 — [char-misc-next 4/8] mei: fix return value on disconnection

FromTomas Winkler <tomas.winkler@intel.com>
Date2016-06-16 17:00 +0200
Subject[char-misc-next 4/8] mei: fix return value on disconnection
Message-ID<rKGVY-1bI-1@gated-at.bofh.it>
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>
---
 drivers/misc/mei/bus.c  | 2 +-
 drivers/misc/mei/main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 63411ddfb83d..9c404dc8eada 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -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;
 		}
 	}
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 3326bde7fba1..d62e89c80beb 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,
 
 		mutex_lock(&dev->device_lock);
 		if (!mei_cl_is_connected(cl)) {
-			rets = -EBUSY;
+			rets = -ENODEV;
 			goto out;
 		}
 	}
-- 
2.5.5

[toc] | [next] | [standalone]


#1429121 — [char-misc-next v2 4/8] mei: fix return value on disconnection

FromTomas Winkler <tomas.winkler@intel.com>
Date2016-06-22 23:30 +0200
Subject[char-misc-next v2 4/8] mei: fix return value on disconnection
Message-ID<rMXSG-lY-13@gated-at.bofh.it>
In reply to#1424144
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>
---
V2: fix the same issue also in amthif.c

 drivers/misc/mei/amthif.c | 2 +-
 drivers/misc/mei/bus.c    | 2 +-
 drivers/misc/mei/main.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 14b454143c81..3cf54ca051ea 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -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;
 		}
 
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 63411ddfb83d..9c404dc8eada 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -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;
 		}
 	}
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 3326bde7fba1..d62e89c80beb 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,
 
 		mutex_lock(&dev->device_lock);
 		if (!mei_cl_is_connected(cl)) {
-			rets = -EBUSY;
+			rets = -ENODEV;
 			goto out;
 		}
 	}
-- 
2.5.5

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web