summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Heng <liheng40@huawei.com>2020-07-30 14:43:50 +0800
committerDavid S. Miller <davem@davemloft.net>2020-07-30 17:41:05 -0700
commitbbf1b94a733d823f195d9e9f960a2e60718acc3e (patch)
tree1023fd9725eda27b8c9af1cfa493e1ce4bfcae7e
parent1e51f9358af513c1620b527d1e8c90b8820591a2 (diff)
downloadlinux-bbf1b94a733d823f195d9e9f960a2e60718acc3e.tar.bz2
bnxt_en: Remove superfluous memset()
Fixes coccicheck warning: ./drivers/net/ethernet/broadcom/bnxt/bnxt.c:3730:19-37: WARNING: dma_alloc_coherent use in stats -> hw_stats already zeroes out memory, so memset is not needed dma_alloc_coherent use in status already zeroes out memory, so memset is not needed Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Li Heng <liheng40@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 2622d3c2d766..31fb5a28e1c4 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3732,8 +3732,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp, struct bnxt_stats_mem *stats,
if (!stats->hw_stats)
return -ENOMEM;
- memset(stats->hw_stats, 0, stats->len);
-
stats->sw_stats = kzalloc(stats->len, GFP_KERNEL);
if (!stats->sw_stats)
goto stats_mem_err;