summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-01-20 18:25:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-05 20:13:01 +0000
commit1e4c227805f2dbadaa14a44f0f3314b6ac2cb6ac (patch)
tree981ad1cbef9ebd43f1a51ee3ed00b258a3904f21
parent3b84b7000c612156f0c2a940f54484399296ad56 (diff)
downloadlinux-stable-1e4c227805f2dbadaa14a44f0f3314b6ac2cb6ac.tar.gz
linux-stable-1e4c227805f2dbadaa14a44f0f3314b6ac2cb6ac.tar.bz2
linux-stable-1e4c227805f2dbadaa14a44f0f3314b6ac2cb6ac.zip
ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
[ Upstream commit bbc404d20d1b46d89b461918bc44587620eda200 ] All error handling paths, except this one, go to 'out' where release_swfw_sync() is called. This call balances the acquire_swfw_sync() call done at the beginning of the function. Branch to the error handling path in order to correctly release some resources in case of error. Fixes: ae14a1d8e104 ("ixgbe: Fix IOSF SB access issues") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index fe2d2d2f0494..cdc912bba808 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -717,7 +717,8 @@ static s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
error = (command & IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK) >>
IXGBE_SB_IOSF_CTRL_CMPL_ERR_SHIFT;
hw_dbg(hw, "Failed to read, error %x\n", error);
- return -EIO;
+ ret = -EIO;
+ goto out;
}
if (!ret)