Commit 0ae8fe6f authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Greg Kroah-Hartman

[PATCH] usb/kaweth: reorder set_current_state() and schedule_timeout()

Reorder set_current_state() and schedule_timeout() for a
minor cleanup. The reorder allows removing two of the
set_current_state() calls.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent ddd63249
......@@ -1250,13 +1250,11 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
return status;
}
set_current_state(TASK_UNINTERRUPTIBLE);
while (timeout && !awd.done) {
timeout = schedule_timeout(timeout);
set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout(timeout);
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&awd.wqh, &wait);
if (!timeout) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment