diff options
| author | Gustavo A. R. Silva <[email protected]> | 2021-10-06 18:09:08 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2021-10-19 17:53:28 +0000 |
| commit | 6f3323536aa8895b1e3fc6fe6762e7ddee916de1 (patch) | |
| tree | 78db61e0b9c693bb6741d3da441be3655406fccc /drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | |
| parent | ice: Make use of the helper function devm_add_action_or_reset() (diff) | |
| download | kernel-6f3323536aa8895b1e3fc6fe6762e7ddee916de1.tar.gz kernel-6f3323536aa8895b1e3fc6fe6762e7ddee916de1.zip | |
ice: use devm_kcalloc() instead of devm_kzalloc()
Use 2-factor multiplication argument form devm_kcalloc() instead
of devm_kzalloc().
Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c index 16de603b280c..38960bcc384c 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c @@ -706,7 +706,7 @@ ice_create_init_fdir_rule(struct ice_pf *pf, enum ice_fltr_ptype flow) if (!seg) return -ENOMEM; - tun_seg = devm_kzalloc(dev, sizeof(*seg) * ICE_FD_HW_SEG_MAX, + tun_seg = devm_kcalloc(dev, sizeof(*seg), ICE_FD_HW_SEG_MAX, GFP_KERNEL); if (!tun_seg) { devm_kfree(dev, seg); @@ -1068,7 +1068,7 @@ ice_cfg_fdir_xtrct_seq(struct ice_pf *pf, struct ethtool_rx_flow_spec *fsp, if (!seg) return -ENOMEM; - tun_seg = devm_kzalloc(dev, sizeof(*seg) * ICE_FD_HW_SEG_MAX, + tun_seg = devm_kcalloc(dev, sizeof(*seg), ICE_FD_HW_SEG_MAX, GFP_KERNEL); if (!tun_seg) { devm_kfree(dev, seg); |
