Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] i40e/i40evf: RSS changes for X722
@ 2015-08-10 21:45 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-08-10 21:45 UTC (permalink / raw)
  To: intel-wired-lan

Hello Anjali Singhai Jain,

The patch e25d00b87b26: "i40e/i40evf: RSS changes for X722" from Jun
23, 2015, leads to the following static checker warning:

	drivers/net/ethernet/intel/i40e/i40e_main.c:7516 i40e_config_rss_aq()
	warn: possible memory leak of 'rss_lut'

drivers/net/ethernet/intel/i40e/i40e_main.c
  7501  
  7502          rss_lut = kzalloc(pf->rss_table_size, GFP_KERNEL);
  7503          if (!rss_lut)
  7504                  return -ENOMEM;
  7505  
  7506          /* Populate the LUT with max no. of queues in round robin fashion */
  7507          for (i = 0; i < vsi->rss_table_size; i++)
  7508                  rss_lut[i] = i % vsi->rss_size;
  7509  
  7510          ret = i40e_aq_set_rss_key(hw, vsi->id, &rss_key);
  7511          if (ret) {
  7512                  dev_info(&pf->pdev->dev,
  7513                           "Cannot set RSS key, err %s aq_err %s\n",
  7514                           i40e_stat_str(&pf->hw, ret),
  7515                           i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));

Missing kfree() here.

  7516                  return ret;
  7517          }
  7518  
  7519          if (vsi->type == I40E_VSI_MAIN)
  7520                  pf_lut = true;
  7521  
  7522          ret = i40e_aq_set_rss_lut(hw, vsi->id, pf_lut, rss_lut,
  7523                                    vsi->rss_table_size);
  7524          if (ret)
  7525                  dev_info(&pf->pdev->dev,
  7526                           "Cannot set RSS lut, err %s aq_err %s\n",
  7527                           i40e_stat_str(&pf->hw, ret),
  7528                           i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
  7529  
  7530          return ret;
  7531  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-10 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 21:45 [Intel-wired-lan] i40e/i40evf: RSS changes for X722 Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox