]> err.no Git - linux-2.6/commitdiff
usb: avoid redundant cast of kmalloc() return value in OTi-6858 driver
authorJesper Juhl <jesper.juhl@gmail.com>
Fri, 24 Aug 2007 00:35:14 +0000 (02:35 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:21 +0000 (14:55 -0700)
In drivers/usb/serial/oti6858.c::pl2303_buf_alloc() the return value
of kmalloc() is being cast to "struct pl2303_buf *", but that need
not be done here since kmalloc() returns "void *".

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/oti6858.c

index 64f3f66a7a353b8962ad9dffb4f3a7b752f7b6c1..d19861166b505cbca39a37f692d61fafd41cdf07 100644 (file)
@@ -1144,7 +1144,7 @@ static struct pl2303_buf *pl2303_buf_alloc(unsigned int size)
        if (size == 0)
                return NULL;
 
-       pb = (struct pl2303_buf *)kmalloc(sizeof(struct pl2303_buf), GFP_KERNEL);
+       pb = kmalloc(sizeof(struct pl2303_buf), GFP_KERNEL);
        if (pb == NULL)
                return NULL;