mei: replace check for connection instead of transitioning
The function mei_cl_is_transitioning is just opposite of mei_cl_is_connected. What we actually wanted to check is if we lost connection so we can discard the check for transition and check for 'not connected' Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Этот коммит содержится в:

коммит произвёл
Greg Kroah-Hartman

родитель
f3de9b635d
Коммит
6a84d63d22
@@ -302,7 +302,7 @@ ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length)
|
||||
|
||||
if (wait_event_interruptible(cl->rx_wait,
|
||||
(!list_empty(&cl->rd_completed)) ||
|
||||
mei_cl_is_transitioning(cl))) {
|
||||
(!mei_cl_is_connected(cl)))) {
|
||||
|
||||
if (signal_pending(current))
|
||||
return -EINTR;
|
||||
@@ -311,7 +311,7 @@ ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length)
|
||||
|
||||
mutex_lock(&dev->device_lock);
|
||||
|
||||
if (mei_cl_is_transitioning(cl)) {
|
||||
if (!mei_cl_is_connected(cl)) {
|
||||
rets = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
Ссылка в новой задаче
Block a user