From: Zheng Yongjun Date: Tue, 29 Dec 2020 13:52:46 +0000 (+0800) Subject: bnxt_en: Use kzalloc for allocating only one thing X-Git-Tag: v5.12-rc1~200^2~415 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33dbcf60556a2a23b07f837e5954991925b72fd2;p=thirdparty%2Flinux.git bnxt_en: Use kzalloc for allocating only one thing Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index d10e4f85dd11a..bbd2a07dc3291 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8603,7 +8603,7 @@ msix_setup_exit: static int bnxt_init_inta(struct bnxt *bp) { - bp->irq_tbl = kcalloc(1, sizeof(struct bnxt_irq), GFP_KERNEL); + bp->irq_tbl = kzalloc(sizeof(struct bnxt_irq), GFP_KERNEL); if (!bp->irq_tbl) return -ENOMEM;