Skip to content

Commit 0b7860d

Browse files
Tomas Winklergregkh
authored andcommitted
mei: fix return value on disconnection
commit 2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266a upstream. Correct errno on client disconnection is -ENODEV not -EBUSY 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>
1 parent bab2f72 commit 0b7860d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/misc/mei/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length)
144144
mutex_lock(&bus->device_lock);
145145

146146
if (!mei_cl_is_connected(cl)) {
147-
rets = -EBUSY;
147+
rets = -ENODEV;
148148
goto out;
149149
}
150150
}

drivers/misc/mei/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
207207

208208
mutex_lock(&dev->device_lock);
209209
if (!mei_cl_is_connected(cl)) {
210-
rets = -EBUSY;
210+
rets = -ENODEV;
211211
goto out;
212212
}
213213
}

0 commit comments

Comments
 (0)