Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] i40e/i40evf: RSS changes for X722
Date: Tue, 11 Aug 2015 00:45:31 +0300	[thread overview]
Message-ID: <20150810214531.GD31724@mwanda> (raw)

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

                 reply	other threads:[~2015-08-10 21:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150810214531.GD31724@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox