diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:25:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:25:47 -0500 |
commit | 2bf2154c6bb5599e3ec3f73c34861a0b12aa839e (patch) | |
tree | 62691bd915e2e3c2e6648306d3fb893f7a1dc57e /drivers/usb/input/hiddev.c | |
parent | 08a4ecee986dd98e86090ff5faac4782b6765aed (diff) | |
parent | 71a8924bee63d891f6256d560e32416a458440b3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (81 commits)
[PATCH] USB: omninet: fix up debugging comments
[PATCH] USB serial: add navman driver
[PATCH] USB: Fix irda-usb use after use
[PATCH] USB: rtl8150 small fix
[PATCH] USB: ftdi_sio: add Icom ID1 USB product and vendor ids
[PATCH] USB: cp2101: add new device IDs
[PATCH] USB: fix check_ctrlrecip to allow control transfers in state ADDRESS
[PATCH] USB: vicam.c: fix a NULL pointer dereference
[PATCH] USB: ZC0301 driver bugfix
[PATCH] USB: add support for Creativelabs Silvercrest USB keyboard
[PATCH] USB: storage: new unusual_devs.h entry: Mitsumi 7in1 Card Reader
[PATCH] USB: storage: unusual_devs.h entry 0420:0001
[PATCH] USB: storage: another unusual_devs.h entry
[PATCH] USB: storage: sandisk unusual_devices entry
[PATCH] USB: fix initdata issue in isp116x-hcd
[PATCH] USB: usbcore: usb_set_configuration oops (NULL ptr dereference)
[PATCH] USB: usbcore: Don't assume a USB configuration includes any interfaces
[PATCH] USB: ub 03 drop stall clearing
[PATCH] USB: ub 02 remove diag
[PATCH] USB: ub 01 remove first_open
...
Diffstat (limited to 'drivers/usb/input/hiddev.c')
-rw-r--r-- | drivers/usb/input/hiddev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c index 925f5aba06f5..6dd666696178 100644 --- a/drivers/usb/input/hiddev.c +++ b/drivers/usb/input/hiddev.c | |||
@@ -257,9 +257,8 @@ static int hiddev_open(struct inode * inode, struct file * file) { | |||
257 | if (i >= HIDDEV_MINORS || !hiddev_table[i]) | 257 | if (i >= HIDDEV_MINORS || !hiddev_table[i]) |
258 | return -ENODEV; | 258 | return -ENODEV; |
259 | 259 | ||
260 | if (!(list = kmalloc(sizeof(struct hiddev_list), GFP_KERNEL))) | 260 | if (!(list = kzalloc(sizeof(struct hiddev_list), GFP_KERNEL))) |
261 | return -ENOMEM; | 261 | return -ENOMEM; |
262 | memset(list, 0, sizeof(struct hiddev_list)); | ||
263 | 262 | ||
264 | list->hiddev = hiddev_table[i]; | 263 | list->hiddev = hiddev_table[i]; |
265 | list->next = hiddev_table[i]->list; | 264 | list->next = hiddev_table[i]->list; |
@@ -754,9 +753,8 @@ int hiddev_connect(struct hid_device *hid) | |||
754 | if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0) | 753 | if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0) |
755 | return -1; | 754 | return -1; |
756 | 755 | ||
757 | if (!(hiddev = kmalloc(sizeof(struct hiddev), GFP_KERNEL))) | 756 | if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL))) |
758 | return -1; | 757 | return -1; |
759 | memset(hiddev, 0, sizeof(struct hiddev)); | ||
760 | 758 | ||
761 | retval = usb_register_dev(hid->intf, &hiddev_class); | 759 | retval = usb_register_dev(hid->intf, &hiddev_class); |
762 | if (retval) { | 760 | if (retval) { |