ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless
authorThomas Meyer <thomas@m3y3r.de>
Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Nov 2011 20:02:36 +0000 (15:02 -0500)
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: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/micrel/ks8851_mll.c

index d19c849059d80755cacb8093de0668776216401d..228c5c0b50dead392628ec23e2e7455eb5e36c5b 100644 (file)
@@ -1500,8 +1500,7 @@ static int ks_hw_init(struct ks_net *ks)
        ks->all_mcast = 0;
        ks->mcast_lst_size = 0;
 
-       ks->frame_head_info = (struct type_frame_head *) \
-               kmalloc(MHEADER_SIZE, GFP_KERNEL);
+       ks->frame_head_info = kmalloc(MHEADER_SIZE, GFP_KERNEL);
        if (!ks->frame_head_info) {
                pr_err("Error: Fail to allocate frame memory\n");
                return false;