All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch] USB: Checking the wrong variable in usb_disable_lpm()
Date: Tue, 22 May 2012 17:54:34 +0000	[thread overview]
Message-ID: <20120522175434.GA29755@elgon.mountain> (raw)

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. */

             reply	other threads:[~2012-05-22 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 17:54 Dan Carpenter [this message]
2012-05-22 20:49 ` [patch] USB: Checking the wrong variable in usb_disable_lpm() Sarah Sharp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120522175434.GA29755@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.