netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Dinghao Liu <dinghao.liu@zju.edu.cn>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	sassmann@redhat.com, Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net 1/4] i40e: Fix error handling in i40e_vsi_open
Date: Thu, 24 Jun 2021 11:14:31 -0700	[thread overview]
Message-ID: <20210624181434.751511-2-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210624181434.751511-1-anthony.l.nguyen@intel.com>

From: Dinghao Liu <dinghao.liu@zju.edu.cn>

When vsi->type == I40E_VSI_FDIR, we have caught the return value of
i40e_vsi_request_irq() but without further handling. Check and execute
memory clean on failure just like the other i40e_vsi_request_irq().

Fixes: 8a9eb7d3cbcab ("i40e: rework fdir setup and teardown")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 704e474879c5..526fa0a791ea 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8703,6 +8703,8 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
 			 dev_driver_string(&pf->pdev->dev),
 			 dev_name(&pf->pdev->dev));
 		err = i40e_vsi_request_irq(vsi, int_name);
+		if (err)
+			goto err_setup_rx;
 
 	} else {
 		err = -EINVAL;
-- 
2.26.2


  reply	other threads:[~2021-06-24 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 18:14 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2021-06-24 Tony Nguyen
2021-06-24 18:14 ` Tony Nguyen [this message]
2021-06-24 18:14 ` [PATCH net 2/4] i40e: Fix autoneg disabling for non-10GBaseT links Tony Nguyen
2021-06-24 18:14 ` [PATCH net 3/4] i40e: fix PTP on 5Gb links Tony Nguyen
2021-06-24 18:14 ` [PATCH net 4/4] i40e: Fix missing rtnl locking when setting up pf switch Tony Nguyen
2021-06-24 20:00 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2021-06-24 patchwork-bot+netdevbpf

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=20210624181434.751511-2-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=tonyx.brelinski@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).