Re: [PATCH] usb: cdc-wdm: manage_power should always set needs_remote_wakeup

2013-12-02 Thread Oliver Neukum
On Fri, 2013-11-29 at 20:17 +0100, Bjørn Mork wrote:
> Cc: 
> Reported-by: Oliver Neukum 
> Signed-off-by: Bjørn Mork 
Acked-by: Oliver Neukum 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: cdc-wdm: manage_power should always set needs_remote_wakeup

2013-11-29 Thread Bjørn Mork
Cc: 
Reported-by: Oliver Neukum 
Signed-off-by: Bjørn Mork 
---
 drivers/usb/class/cdc-wdm.c |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 4d387596f3f0..0b23a8639311 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -854,13 +854,11 @@ static int wdm_manage_power(struct usb_interface *intf, 
int on)
 {
/* need autopm_get/put here to ensure the usbcore sees the new value */
int rv = usb_autopm_get_interface(intf);
-   if (rv < 0)
-   goto err;
 
intf->needs_remote_wakeup = on;
-   usb_autopm_put_interface(intf);
-err:
-   return rv;
+   if (!rv)
+   usb_autopm_put_interface(intf);
+   return 0;
 }
 
 static int wdm_probe(struct usb_interface *intf, const struct usb_device_id 
*id)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html