Skip to contentSkip to conversation

HID-Core: Tiny patch to remove a kmalloc cast

PATCH Applied Ahmed S. Darwish 2 participants 2 messages Jan 6, 2007 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID-Core: Tiny patch to remove a kmalloc cast

I'm really shy from the size of the patch :).

drivers/hid/hid-core.c +1 -1
index 18c2b3c..2fcfdbb 100644
@@ -656,7 +656,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size)
 	for (i = 0; i < HID_REPORT_TYPES; i++)
 		INIT_LIST_HEAD(&device->report_enum[i].report_list);
 
-	if (!(device->rdesc = (__u8 *)kmalloc(size, GFP_KERNEL))) {
+	if (!(device->rdesc = kmalloc(size, GFP_KERNEL))) {
 		kfree(device->collection);
 		kfree(device);
 		return NULL;
Signature · 2 lines
Ahmed S. Darwish
http://darwish-07.blogspot.com
Applied
#1 lore raw
Quoted 6 lines · Ahmed S. Darwish
drivers/hid/hid-core.c +0 -0
index 18c2b3c..2fcfdbb 100644

drivers/hid/hid-core.c struct hid_device *hid_parse_report(__u8 *start, unsigned size) · line 662

Quoted 8 lines
drivers/hid/hid-core.c +1 -1
@@ -656,7 +656,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size)
 	for (i = 0; i < HID_REPORT_TYPES; i++)
 		INIT_LIST_HEAD(&device->report_enum[i].report_list);
 
-	if (!(device->rdesc = (__u8 *)kmalloc(size, GFP_KERNEL))) {
+	if (!(device->rdesc = kmalloc(size, GFP_KERNEL))) {
 		kfree(device->collection);
 		kfree(device);
 		return NULL;

Queued for upstream, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs