Skip to content

Commit

Permalink
net: broadcom: bcm4908_enet: drop unneeded memset()
Browse files Browse the repository at this point in the history
dma_alloc_coherent takes care of zeroing allocated memory

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rafał Miłecki authored and David S. Miller committed Feb 11, 2021
1 parent 9d61d13 commit af263af
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/broadcom/bcm4908_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet,
if (!ring->slots)
goto err_free_buf_descs;

memset(ring->cpu_addr, 0, size);

ring->read_idx = 0;
ring->write_idx = 0;

Expand Down

0 comments on commit af263af

Please sign in to comment.