Skip to content

Commit

Permalink
ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Meyer authored and David S. Miller committed Nov 21, 2011
1 parent 8524b00 commit 7a2da3d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/micrel/ks8851_mll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7a2da3d

Please sign in to comment.