Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5484
b: refs/heads/master
c: a6db592
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hund authored and Linus Torvalds committed Jul 29, 2005
1 parent c230d18 commit efb50ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86d30741e480f40676c2173e1153368a4846da48
refs/heads/master: a6db592e1624bb7ec62cf56629c9556442169ac5
7 changes: 6 additions & 1 deletion trunk/drivers/usb/misc/ldusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* V0.1 (mh) Initial version
* V0.11 (mh) Added raw support for HID 1.0 devices (no interrupt out endpoint)
* V0.12 (mh) Added kmalloc check for string buffer
*/

#include <linux/config.h>
Expand Down Expand Up @@ -84,7 +85,7 @@ static struct usb_device_id ld_usb_table [] = {
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, ld_usb_table);
MODULE_VERSION("V0.11");
MODULE_VERSION("V0.12");
MODULE_AUTHOR("Michael Hund <mhund@ld-didactic.de>");
MODULE_DESCRIPTION("LD USB Driver");
MODULE_LICENSE("GPL");
Expand Down Expand Up @@ -635,6 +636,10 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
(le16_to_cpu(udev->descriptor.idProduct) == USB_DEVICE_ID_COM3LAB)) &&
(le16_to_cpu(udev->descriptor.bcdDevice) <= 0x103)) {
buffer = kmalloc(256, GFP_KERNEL);
if (buffer == NULL) {
dev_err(&intf->dev, "Couldn't allocate string buffer\n");
goto error;
}
/* usb_string makes SETUP+STALL to leave always ControlReadLoop */
usb_string(udev, 255, buffer, 256);
kfree(buffer);
Expand Down

0 comments on commit efb50ee

Please sign in to comment.