Commit 79d9b62a authored by Bjørn Mork's avatar Bjørn Mork Committed by David S. Miller

net: qmi_wwan: manage_power should always set needs_remote_wakeup

Reported-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04d948a9
...@@ -149,7 +149,7 @@ static const struct net_device_ops qmi_wwan_netdev_ops = { ...@@ -149,7 +149,7 @@ static const struct net_device_ops qmi_wwan_netdev_ops = {
static int qmi_wwan_manage_power(struct usbnet *dev, int on) static int qmi_wwan_manage_power(struct usbnet *dev, int on)
{ {
struct qmi_wwan_state *info = (void *)&dev->data; struct qmi_wwan_state *info = (void *)&dev->data;
int rv = 0; int rv;
dev_dbg(&dev->intf->dev, "%s() pmcount=%d, on=%d\n", __func__, dev_dbg(&dev->intf->dev, "%s() pmcount=%d, on=%d\n", __func__,
atomic_read(&info->pmcount), on); atomic_read(&info->pmcount), on);
...@@ -160,13 +160,11 @@ static int qmi_wwan_manage_power(struct usbnet *dev, int on) ...@@ -160,13 +160,11 @@ static int qmi_wwan_manage_power(struct usbnet *dev, int on)
* the new value * the new value
*/ */
rv = usb_autopm_get_interface(dev->intf); rv = usb_autopm_get_interface(dev->intf);
if (rv < 0)
goto err;
dev->intf->needs_remote_wakeup = on; dev->intf->needs_remote_wakeup = on;
usb_autopm_put_interface(dev->intf); if (!rv)
usb_autopm_put_interface(dev->intf);
} }
err: return 0;
return rv;
} }
static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on) static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on)
......
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