Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8383c6bf authored by Thomas Meyer's avatar Thomas Meyer Committed by Jiri Kosina
Browse files

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: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 30307c69
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;