Skip to content

Commit

Permalink
[PATCH] USB: fix local variable clash
Browse files Browse the repository at this point in the history
This patch (as621) fixes a local variable conflict I accidently
introduced into usb_set_configuration.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent 3717f29 commit f3d34ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,11 +1387,11 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
if (dev->state != USB_STATE_ADDRESS)
usb_disable_device (dev, 1); // Skip ep0

n = dev->bus_mA - cp->desc.bMaxPower * 2;
if (n < 0)
i = dev->bus_mA - cp->desc.bMaxPower * 2;
if (i < 0)
dev_warn(&dev->dev, "new config #%d exceeds power "
"limit by %dmA\n",
configuration, -n);
configuration, -i);

if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
Expand Down

0 comments on commit f3d34ed

Please sign in to comment.