Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc52f951 authored by Maninder Singh's avatar Maninder Singh Committed by Jeff Kirsher
Browse files

ixgbe: use kzalloc for allocating one thing



Use kzalloc rather than kcalloc(1..

The semantic patch that makes this change is as follows:

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

and removing checkpatch below CHECK:
CHECK: Prefer kzalloc(sizeof(*fwd_adapter)...) over
kzalloc(sizeof(struct ixgbe_fwd_adapter)...)

Signed-off-by: default avatarManinder Singh <maninder1.s@samsung.com>
Reviewed-by: default avatarVaneet Narang <v.narang@samsung.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent fa888b89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8261,7 +8261,7 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
	    (adapter->num_rx_pools > IXGBE_MAX_MACVLANS))
		return ERR_PTR(-EBUSY);

	fwd_adapter = kcalloc(1, sizeof(struct ixgbe_fwd_adapter), GFP_KERNEL);
	fwd_adapter = kzalloc(sizeof(*fwd_adapter), GFP_KERNEL);
	if (!fwd_adapter)
		return ERR_PTR(-ENOMEM);