[char-misc-next 2/2] mei: make return values consistent across the driver
From: Tomas Winkler
Date: Mon Mar 31 2014 - 11:02:02 EST
From: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
Follow-up for bits missed in
commit 7ca96aa278f8b9983184e318b06a0ed9ad0297b8
mei: make return values consistent across the driver
Signed-off-by: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
---
drivers/misc/mei/bus.c | 2 +-
drivers/misc/mei/client.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index ddc5ac9..d5b9ed4 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -247,7 +247,7 @@ static int ___mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length,
return id;
if (length > dev->me_clients[id].props.max_msg_length)
- return -EINVAL;
+ return -EFBIG;
cb = mei_io_cb_init(cl, NULL);
if (!cb)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 0c70459..4c06ceb 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -768,10 +768,9 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)
cb->fop_type = MEI_FOP_READ;
if (mei_hbuf_acquire(dev)) {
- if (mei_hbm_cl_flow_control_req(dev, cl)) {
- rets = -ENODEV;
+ rets = mei_hbm_cl_flow_control_req(dev, cl);
+ if (rets < 0)
goto out;
- }
list_add_tail(&cb->list, &dev->read_list.list);
} else {
--
1.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/