Skip to content
Snippets Groups Projects
Commit 7a2da3d4 authored by Thomas Meyer's avatar Thomas Meyer Committed by David S. Miller
Browse files

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: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8524b001
No related branches found
No related tags found
No related merge requests found
...@@ -1500,8 +1500,7 @@ static int ks_hw_init(struct ks_net *ks) ...@@ -1500,8 +1500,7 @@ static int ks_hw_init(struct ks_net *ks)
ks->all_mcast = 0; ks->all_mcast = 0;
ks->mcast_lst_size = 0; ks->mcast_lst_size = 0;
ks->frame_head_info = (struct type_frame_head *) \ ks->frame_head_info = kmalloc(MHEADER_SIZE, GFP_KERNEL);
kmalloc(MHEADER_SIZE, GFP_KERNEL);
if (!ks->frame_head_info) { if (!ks->frame_head_info) {
pr_err("Error: Fail to allocate frame memory\n"); pr_err("Error: Fail to allocate frame memory\n");
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment