diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-08-04 15:56:15 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-08-04 15:56:15 -0500 |
commit | a5c96cab8f3c4ca9b2177dceb5de5a0edb31418e (patch) | |
tree | 45692a1b3d770f721f4586ad81c206f1b8509b75 /drivers/usb/misc | |
parent | 30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd (diff) | |
parent | 1c5ad84516ae7ea4ec868436a910a6bd8d20215a (diff) | |
download | kernel-crypto-a5c96cab8f3c4ca9b2177dceb5de5a0edb31418e.tar.gz kernel-crypto-a5c96cab8f3c4ca9b2177dceb5de5a0edb31418e.tar.xz kernel-crypto-a5c96cab8f3c4ca9b2177dceb5de5a0edb31418e.zip |
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/ldusb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 66ec88354b9..ad17892aac9 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c @@ -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> @@ -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"); @@ -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); |