linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.20-rc3] HID-Core: Tiny patch to remove a kmalloc cast
@ 2007-01-06 13:18 Ahmed S. Darwish
  2007-01-06 16:18 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmed S. Darwish @ 2007-01-06 13:18 UTC (permalink / raw)
  To: jkosina; +Cc: linux-kernel

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

Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 18c2b3c..2fcfdbb 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -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;


-- 
Ahmed S. Darwish
http://darwish-07.blogspot.com

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.20-rc3] HID-Core: Tiny patch to remove a kmalloc cast
  2007-01-06 13:18 [PATCH 2.6.20-rc3] HID-Core: Tiny patch to remove a kmalloc cast Ahmed S. Darwish
@ 2007-01-06 16:18 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2007-01-06 16:18 UTC (permalink / raw)
  To: Ahmed S. Darwish; +Cc: linux-kernel

On Sat, 6 Jan 2007, Ahmed S. Darwish wrote:

> Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 18c2b3c..2fcfdbb 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -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.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-06 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-06 13:18 [PATCH 2.6.20-rc3] HID-Core: Tiny patch to remove a kmalloc cast Ahmed S. Darwish
2007-01-06 16:18 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).