aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/hid-lgff.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 12:25:47 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 12:25:47 -0500
commit2bf2154c6bb5599e3ec3f73c34861a0b12aa839e (patch)
tree62691bd915e2e3c2e6648306d3fb893f7a1dc57e /drivers/usb/input/hid-lgff.c
parent08a4ecee986dd98e86090ff5faac4782b6765aed (diff)
parent71a8924bee63d891f6256d560e32416a458440b3 (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/hid-lgff.c')
-rw-r--r--drivers/usb/input/hid-lgff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/input/hid-lgff.c b/drivers/usb/input/hid-lgff.c
index f82c9c9e5d51..f07d44357ff1 100644
--- a/drivers/usb/input/hid-lgff.c
+++ b/drivers/usb/input/hid-lgff.c
@@ -154,10 +154,9 @@ int hid_lgff_init(struct hid_device* hid)
154 return -1; 154 return -1;
155 } 155 }
156 156
157 private = kmalloc(sizeof(struct lgff_device), GFP_KERNEL); 157 private = kzalloc(sizeof(struct lgff_device), GFP_KERNEL);
158 if (!private) 158 if (!private)
159 return -1; 159 return -1;
160 memset(private, 0, sizeof(struct lgff_device));
161 hid->ff_private = private; 160 hid->ff_private = private;
162 161
163 /* Input init */ 162 /* Input init */
@@ -228,13 +227,12 @@ static struct hid_report* hid_lgff_duplicate_report(struct hid_report* report)
228 } 227 }
229 *ret->field[0] = *report->field[0]; 228 *ret->field[0] = *report->field[0];
230 229
231 ret->field[0]->value = kmalloc(sizeof(s32[8]), GFP_KERNEL); 230 ret->field[0]->value = kzalloc(sizeof(s32[8]), GFP_KERNEL);
232 if (!ret->field[0]->value) { 231 if (!ret->field[0]->value) {
233 kfree(ret->field[0]); 232 kfree(ret->field[0]);
234 kfree(ret); 233 kfree(ret);
235 return NULL; 234 return NULL;
236 } 235 }
237 memset(ret->field[0]->value, 0, sizeof(s32[8]));
238 236
239 return ret; 237 return ret;
240} 238}