]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging: fsl-dpaa2/ethsw: Remove useless set memory to zero use memset()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 2 Aug 2019 01:31:49 +0000 (01:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2019 11:55:38 +0000 (13:55 +0200)
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>
drivers/staging/fsl-dpaa2/ethsw/ethsw.c

index 4b94a01513a75c7da856d0f91748774a84a8104b..aac98ece2335b0764678562b99a7ee445ae77179 100644 (file)
@@ -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)) {