提交 f3d34ed4 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

[PATCH] USB: fix local variable clash

This patch (as621) fixes a local variable conflict I accidently
introduced into usb_set_configuration.
Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 3717f295
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册