summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl-dpaa2
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-08-02 01:31:49 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-02 13:55:38 +0200
commita5589269e660a14ab8580235909100f245d73cb9 (patch)
treeddee1caa015d23ad7236fa68e57ac5adc431305a /drivers/staging/fsl-dpaa2
parent0b800f3dbae710ed72ad544d17fd186ea5b5e504 (diff)
staging: fsl-dpaa2/ethsw: Remove useless set memory to zero use memset()
The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20190802013149.80952-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-dpaa2')
-rw-r--r--drivers/staging/fsl-dpaa2/ethsw/ethsw.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index 4b94a01513a7..aac98ece2335 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -641,8 +641,6 @@ static int port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
if (!dma_mem)
return -ENOMEM;
- memset(dma_mem, 0, fdb_dump_size);
-
fdb_dump_iova = dma_map_single(dev, dma_mem, fdb_dump_size,
DMA_FROM_DEVICE);
if (dma_mapping_error(dev, fdb_dump_iova)) {