Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless

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>

authored by

Thomas Meyer and committed by
David S. Miller
7a2da3d4 8524b001

+1 -2
+1 -2
drivers/net/ethernet/micrel/ks8851_mll.c
··· 1500 1500 ks->all_mcast = 0; 1501 1501 ks->mcast_lst_size = 0; 1502 1502 1503 - ks->frame_head_info = (struct type_frame_head *) \ 1504 - kmalloc(MHEADER_SIZE, GFP_KERNEL); 1503 + ks->frame_head_info = kmalloc(MHEADER_SIZE, GFP_KERNEL); 1505 1504 if (!ks->frame_head_info) { 1506 1505 pr_err("Error: Fail to allocate frame memory\n"); 1507 1506 return false;