Skip to content

Commit 7a2da3d

Browse files
thomasmeydavem330
authored andcommitted
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>
1 parent 8524b00 commit 7a2da3d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/net/ethernet/micrel/ks8851_mll.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,8 +1500,7 @@ static int ks_hw_init(struct ks_net *ks)
15001500
ks->all_mcast = 0;
15011501
ks->mcast_lst_size = 0;
15021502

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);
15051504
if (!ks->frame_head_info) {
15061505
pr_err("Error: Fail to allocate frame memory\n");
15071506
return false;

0 commit comments

Comments
 (0)