diff options
author | Bjørn Mork <bjorn@mork.no> | 2013-11-01 09:18:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-04 15:40:16 -0500 |
commit | 04d948a9fc7b352b05125bd3d81c565fb8840c56 (patch) | |
tree | e7981162dfdba15a3e88bff2a75b89daf876d5ec /drivers/net/usb | |
parent | 96635fbd0b6c9113a374333092f40fc34fccb4f7 (diff) |
net: cdc_mbim: manage_power should always set needs_remote_wakeup
Reported-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_mbim.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c index af76aaf08b6b..fbfd67fe6a9a 100644 --- a/drivers/net/usb/cdc_mbim.c +++ b/drivers/net/usb/cdc_mbim.c | |||
@@ -44,13 +44,11 @@ static int cdc_mbim_manage_power(struct usbnet *dev, int on) | |||
44 | if ((on && atomic_add_return(1, &info->pmcount) == 1) || (!on && atomic_dec_and_test(&info->pmcount))) { | 44 | if ((on && atomic_add_return(1, &info->pmcount) == 1) || (!on && atomic_dec_and_test(&info->pmcount))) { |
45 | /* need autopm_get/put here to ensure the usbcore sees the new value */ | 45 | /* need autopm_get/put here to ensure the usbcore sees the new value */ |
46 | rv = usb_autopm_get_interface(dev->intf); | 46 | rv = usb_autopm_get_interface(dev->intf); |
47 | if (rv < 0) | ||
48 | goto err; | ||
49 | dev->intf->needs_remote_wakeup = on; | 47 | dev->intf->needs_remote_wakeup = on; |
50 | usb_autopm_put_interface(dev->intf); | 48 | if (!rv) |
49 | usb_autopm_put_interface(dev->intf); | ||
51 | } | 50 | } |
52 | err: | 51 | return 0; |
53 | return rv; | ||
54 | } | 52 | } |
55 | 53 | ||
56 | static int cdc_mbim_wdm_manage_power(struct usb_interface *intf, int status) | 54 | static int cdc_mbim_wdm_manage_power(struct usb_interface *intf, int status) |