* [patch] USB: Checking the wrong variable in usb_disable_lpm()
@ 2012-05-22 17:54 Dan Carpenter
2012-05-22 20:49 ` Sarah Sharp
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-05-22 17:54 UTC (permalink / raw)
To: kernel-janitors
We check "u1_params" instead of checking "u2_params".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static checker stuff, not tested.
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 04fb834..25a7422 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3379,7 +3379,7 @@ int usb_disable_lpm(struct usb_device *udev)
return 0;
udev->lpm_disable_count++;
- if ((udev->u1_params.timeout = 0 && udev->u1_params.timeout = 0))
+ if ((udev->u1_params.timeout = 0 && udev->u2_params.timeout = 0))
return 0;
/* If LPM is enabled, attempt to disable it. */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] USB: Checking the wrong variable in usb_disable_lpm()
2012-05-22 17:54 [patch] USB: Checking the wrong variable in usb_disable_lpm() Dan Carpenter
@ 2012-05-22 20:49 ` Sarah Sharp
0 siblings, 0 replies; 2+ messages in thread
From: Sarah Sharp @ 2012-05-22 20:49 UTC (permalink / raw)
To: kernel-janitors
On Tue, May 22, 2012 at 08:54:34PM +0300, Dan Carpenter wrote:
> We check "u1_params" instead of checking "u2_params".
Thanks for finding this, Dan. Your patch looks correct. I'll send it
off to Greg (along with a fix for the signed-ness issue) soon.
I suspect the pull will be put off a week or so, since the merge window
is coming, and Greg's traveling starting today.
Sarah Sharp
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Static checker stuff, not tested.
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 04fb834..25a7422 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3379,7 +3379,7 @@ int usb_disable_lpm(struct usb_device *udev)
> return 0;
>
> udev->lpm_disable_count++;
> - if ((udev->u1_params.timeout = 0 && udev->u1_params.timeout = 0))
> + if ((udev->u1_params.timeout = 0 && udev->u2_params.timeout = 0))
> return 0;
>
> /* If LPM is enabled, attempt to disable it. */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-22 20:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 17:54 [patch] USB: Checking the wrong variable in usb_disable_lpm() Dan Carpenter
2012-05-22 20:49 ` Sarah Sharp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox