diff options
Diffstat (limited to 'drivers/usb/core/message.c')
| -rw-r--r-- | drivers/usb/core/message.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 49e7f56e0d7f..30a0690f3683 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
| @@ -59,7 +59,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int *actual_length) | |||
| 59 | retval = (ctx.status == -ENOENT ? -ETIMEDOUT : ctx.status); | 59 | retval = (ctx.status == -ENOENT ? -ETIMEDOUT : ctx.status); |
| 60 | 60 | ||
| 61 | dev_dbg(&urb->dev->dev, | 61 | dev_dbg(&urb->dev->dev, |
| 62 | "%s timed out on ep%d%s len=%d/%d\n", | 62 | "%s timed out on ep%d%s len=%u/%u\n", |
| 63 | current->comm, | 63 | current->comm, |
| 64 | usb_endpoint_num(&urb->ep->desc), | 64 | usb_endpoint_num(&urb->ep->desc), |
| 65 | usb_urb_dir_in(urb) ? "in" : "out", | 65 | usb_urb_dir_in(urb) ? "in" : "out", |
| @@ -804,18 +804,16 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size) | |||
| 804 | dev_err(&dev->dev, | 804 | dev_err(&dev->dev, |
| 805 | "string descriptor 0 read error: %d\n", | 805 | "string descriptor 0 read error: %d\n", |
| 806 | err); | 806 | err); |
| 807 | goto errout; | ||
| 808 | } else if (err < 4) { | 807 | } else if (err < 4) { |
| 809 | dev_err(&dev->dev, "string descriptor 0 too short\n"); | 808 | dev_err(&dev->dev, "string descriptor 0 too short\n"); |
| 810 | err = -EINVAL; | ||
| 811 | goto errout; | ||
| 812 | } else { | 809 | } else { |
| 813 | dev->have_langid = 1; | ||
| 814 | dev->string_langid = tbuf[2] | (tbuf[3] << 8); | 810 | dev->string_langid = tbuf[2] | (tbuf[3] << 8); |
| 815 | /* always use the first langid listed */ | 811 | /* always use the first langid listed */ |
| 816 | dev_dbg(&dev->dev, "default language 0x%04x\n", | 812 | dev_dbg(&dev->dev, "default language 0x%04x\n", |
| 817 | dev->string_langid); | 813 | dev->string_langid); |
| 818 | } | 814 | } |
| 815 | |||
| 816 | dev->have_langid = 1; | ||
| 819 | } | 817 | } |
| 820 | 818 | ||
| 821 | err = usb_string_sub(dev, dev->string_langid, index, tbuf); | 819 | err = usb_string_sub(dev, dev->string_langid, index, tbuf); |
| @@ -1719,7 +1717,8 @@ free_interfaces: | |||
| 1719 | } | 1717 | } |
| 1720 | kfree(new_interfaces); | 1718 | kfree(new_interfaces); |
| 1721 | 1719 | ||
| 1722 | if (cp->string == NULL) | 1720 | if (cp->string == NULL && |
| 1721 | !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) | ||
| 1723 | cp->string = usb_cache_string(dev, cp->desc.iConfiguration); | 1722 | cp->string = usb_cache_string(dev, cp->desc.iConfiguration); |
| 1724 | 1723 | ||
| 1725 | /* Now that all the interfaces are set up, register them | 1724 | /* Now that all the interfaces are set up, register them |
