Commit 8383c6bf9356cfd7093f7afbf16d2b8b4e1c2772
Committed by
Jiri Kosina
1 parent
30307c69d5
Exists in
master
and in
38 other branches
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/hid/hid-lg4ff.c
... | ... | @@ -430,7 +430,7 @@ |
430 | 430 | } |
431 | 431 | |
432 | 432 | /* Add the device to device_list */ |
433 | - entry = (struct lg4ff_device_entry *)kzalloc(sizeof(struct lg4ff_device_entry), GFP_KERNEL); | |
433 | + entry = kzalloc(sizeof(struct lg4ff_device_entry), GFP_KERNEL); | |
434 | 434 | if (!entry) { |
435 | 435 | hid_err(hid, "Cannot add device, insufficient memory.\n"); |
436 | 436 | return -ENOMEM; |