aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-06-19 17:15:51 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-22 20:34:17 -0400
commitfb13c47b8e5ce707268bd38cfd082da377eac4b7 (patch)
treed35d5ba0a22e10fb6cf528eeaa8eb45a06eddd14 /drivers
parentb9f90eb2740203ff2592efe640409ad48335d1c2 (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.c4
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)
796 if (info->manage_power) { 796 if (info->manage_power) {
797 retval = info->manage_power(dev, 1); 797 retval = info->manage_power(dev, 1);
798 if (retval < 0) 798 if (retval < 0)
799 goto done; 799 goto done_manage_power_error;
800 usb_autopm_put_interface(dev->intf); 800 usb_autopm_put_interface(dev->intf);
801 } 801 }
802 return retval; 802 return retval;
803 803
804done_manage_power_error:
805 clear_bit(EVENT_DEV_OPEN, &dev->flags);
804done: 806done:
805 usb_autopm_put_interface(dev->intf); 807 usb_autopm_put_interface(dev->intf);
806done_nopm: 808done_nopm: