Commit 10c8211c authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

USB: pegasus error path not resetting task's state

there is an error path in the pegasus driver which can leave
the task in TASK_UNINTERRUPTIBLE. Depending on when it
schedules next, this can be bad.
Signed-off-by: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9aa742ef
...@@ -163,6 +163,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, ...@@ -163,6 +163,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
/* using ATOMIC, we'd never wake up if we slept */ /* using ATOMIC, we'd never wake up if we slept */
if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
set_current_state(TASK_RUNNING);
if (ret == -ENODEV) if (ret == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_drv(pegasus)) if (netif_msg_drv(pegasus))
......
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