diff options
author | Ming Lei <ming.lei@canonical.com> | 2012-06-19 21:15:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-22 17:34:17 -0700 |
commit | fb13c47b8e5ce707268bd38cfd082da377eac4b7 (patch) | |
tree | d35d5ba0a22e10fb6cf528eeaa8eb45a06eddd14 /drivers | |
parent | b9f90eb2740203ff2592efe640409ad48335d1c2 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/usbnet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index d4f7256a607d..815493caea7f 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -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: |