mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-30 05:15:03 +00:00
usbnet: clear OPEN flag in failure path
Without clearing OPEN flag in failure path, runtime or system resume may submit interrupt/rx URB and start tx queue mistakenly on a interface in DOWN state. Signed-off-by: Ming Lei <ming.lei@canonical.com> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b9f90eb274
commit
fb13c47b8e
@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net)
|
||||
if (info->manage_power) {
|
||||
retval = info->manage_power(dev, 1);
|
||||
if (retval < 0)
|
||||
goto done;
|
||||
goto done_manage_power_error;
|
||||
usb_autopm_put_interface(dev->intf);
|
||||
}
|
||||
return retval;
|
||||
|
||||
done_manage_power_error:
|
||||
clear_bit(EVENT_DEV_OPEN, &dev->flags);
|
||||
done:
|
||||
usb_autopm_put_interface(dev->intf);
|
||||
done_nopm:
|
||||
|
Loading…
Reference in New Issue
Block a user