summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lg4ff.c
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2011-11-08 20:14:14 +0100
committerJiri Kosina <jkosina@suse.cz>2011-11-11 15:09:29 +0100
commit8383c6bf9356cfd7093f7afbf16d2b8b4e1c2772 (patch)
tree99a348a8f6ec3102a8b6a1d82d0fd4cb4e915b42 /drivers/hid/hid-lg4ff.c
parent30307c69d59b14723fbf8a524847b302388c702d (diff)
downloadop-kernel-dev-8383c6bf9356cfd7093f7afbf16d2b8b4e1c2772.zip
op-kernel-dev-8383c6bf9356cfd7093f7afbf16d2b8b4e1c2772.tar.gz
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>
Diffstat (limited to 'drivers/hid/hid-lg4ff.c')
-rw-r--r--drivers/hid/hid-lg4ff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index 103f30d..6ecc9e2 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -430,7 +430,7 @@ int lg4ff_init(struct hid_device *hid)
}
/* 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) {
hid_err(hid, "Cannot add device, insufficient memory.\n");
return -ENOMEM;
OpenPOWER on IntegriCloud