HID: hid-lg4ff: Casting (void *) value returned by kmalloc is useless

Casting (void *) value returned by kmalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Thomas Meyer 2011-11-08 20:14:14 +01:00 committed by Jiri Kosina
parent 30307c69d5
commit 8383c6bf93
1 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,7 @@ int lg4ff_init(struct hid_device *hid)
} }
/* Add the device to device_list */ /* Add the device to device_list */
entry = (struct lg4ff_device_entry *)kzalloc(sizeof(struct lg4ff_device_entry), GFP_KERNEL); entry = kzalloc(sizeof(struct lg4ff_device_entry), GFP_KERNEL);
if (!entry) { if (!entry) {
hid_err(hid, "Cannot add device, insufficient memory.\n"); hid_err(hid, "Cannot add device, insufficient memory.\n");
return -ENOMEM; return -ENOMEM;