Commit fb13c47b authored by Ming Lei's avatar Ming Lei Committed by David S. Miller

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: default avatarMing Lei <ming.lei@canonical.com>
Acked-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9f90eb2
...@@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net) ...@@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net)
if (info->manage_power) { if (info->manage_power) {
retval = info->manage_power(dev, 1); retval = info->manage_power(dev, 1);
if (retval < 0) if (retval < 0)
goto done; goto done_manage_power_error;
usb_autopm_put_interface(dev->intf); usb_autopm_put_interface(dev->intf);
} }
return retval; return retval;
done_manage_power_error:
clear_bit(EVENT_DEV_OPEN, &dev->flags);
done: done:
usb_autopm_put_interface(dev->intf); usb_autopm_put_interface(dev->intf);
done_nopm: done_nopm:
......
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