Commit d17038d6 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher

i40e: trivial: remove unnecessary local var

Probe routine already has too many locals, just convert one
used for kzalloc into a kcalloc, eliminating the local.

Change-ID: I349049872b71f858cbeb91ad7836e6767fc7b7d1
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: default avatarAnjali Singhai <anjali.singhai@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 2eccf1d6
...@@ -10637,7 +10637,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -10637,7 +10637,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
u16 wol_nvm_bits; u16 wol_nvm_bits;
u16 link_status; u16 link_status;
int err; int err;
u32 len;
u32 val; u32 val;
u32 i; u32 i;
u8 set_fc_aq_fail; u8 set_fc_aq_fail;
...@@ -10896,8 +10895,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -10896,8 +10895,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pf->num_alloc_vsi = pf->hw.func_caps.num_vsis; pf->num_alloc_vsi = pf->hw.func_caps.num_vsis;
/* Set up the *vsi struct and our local tracking of the MAIN PF vsi. */ /* Set up the *vsi struct and our local tracking of the MAIN PF vsi. */
len = sizeof(struct i40e_vsi *) * pf->num_alloc_vsi; pf->vsi = kcalloc(pf->num_alloc_vsi, sizeof(struct i40e_vsi *),
pf->vsi = kzalloc(len, GFP_KERNEL); GFP_KERNEL);
if (!pf->vsi) { if (!pf->vsi) {
err = -ENOMEM; err = -ENOMEM;
goto err_switch_setup; goto err_switch_setup;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment