diff options
| author | Nathan Scott <nathans@bruce> | 2006-03-22 15:31:14 +1100 |
|---|---|---|
| committer | Nathan Scott <nathans@bruce> | 2006-03-22 15:31:14 +1100 |
| commit | 4d74f423c722b8cadfabe087369200013b217b67 (patch) | |
| tree | d62facddfdb0dfd89f3e61f4fc699cf2feb4b082 /drivers/usb/input/hiddev.c | |
| parent | bb19fba1937cb6ab2bb98ac893365f6ebf88ef1b (diff) | |
| parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) | |
Merge HEAD from ../linux-2.6
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) { if (i >= HIDDEV_MINORS || !hiddev_table[i]) return -ENODEV; - if (!(list = kmalloc(sizeof(struct hiddev_list), GFP_KERNEL))) + if (!(list = kzalloc(sizeof(struct hiddev_list), GFP_KERNEL))) return -ENOMEM; - memset(list, 0, sizeof(struct hiddev_list)); list->hiddev = hiddev_table[i]; list->next = hiddev_table[i]->list; @@ -754,9 +753,8 @@ int hiddev_connect(struct hid_device *hid) if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0) return -1; - if (!(hiddev = kmalloc(sizeof(struct hiddev), GFP_KERNEL))) + if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL))) return -1; - memset(hiddev, 0, sizeof(struct hiddev)); retval = usb_register_dev(hid->intf, &hiddev_class); if (retval) { |
