From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB6BF78B4B; Wed, 21 Feb 2024 14:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708524400; cv=none; b=F3WNH1DxA3DFOiR5NHFQz/i/bRiLH5CMpXqI0GUQlxte8pka7KX56YWMrGDhWorWOTj/BDVWQM7PguePYPMwdIqduYDzOnAUHjQ7iia8c4R6wipk5mGzVfdkKarY+EZbeuA2xu8AgxrTDskpbfgJLy0ZoRc/E7LmCViF0a/TyIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708524400; c=relaxed/simple; bh=+hU+LcNFV66JPS1W3whaUqvy+ozzDbBrsVlLSIENChk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MJsamDvM+UpDDwZN+5euWg4T4BbBN4sac4QuXC/PL+6M9rTXv2p7gGckthHhpwPHM9POow6X24AzdoK6D3odY3XOLBrfhqa7YAsVLZEKaaxgO0GIeVQ1EOndcaZT805lO3BxN1ug5OOtc0MERiS0VFVl/i5A340gW0YaMRstx00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1ND7Ta9B; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1ND7Ta9B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62FA4C433F1; Wed, 21 Feb 2024 14:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708524399; bh=+hU+LcNFV66JPS1W3whaUqvy+ozzDbBrsVlLSIENChk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1ND7Ta9BjW7TMBZ4AUiuXXF744bYY6D7CbZvb1aRWoWUhuT4JlGfPNON3BdTJAunc teCY3o4ZTMHQOZ6x1xhdtulSGPYp6WQcipw1/42igGLlTnqM76evNDzFBAl8xaIES6 YUN+xHhmslr/gmkvC8/C1wrqnh+MD54tIQmJAb70= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe JAILLET , Simon Horman , Tony Nguyen , Sasha Levin , Pucha Himasekhar Reddy Subject: [PATCH 5.10 233/379] ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550() Date: Wed, 21 Feb 2024 14:06:52 +0100 Message-ID: <20240221130001.806015323@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125954.917878865@linuxfoundation.org> References: <20240221125954.917878865@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ 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 Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index 73d1a8b85449..9347dc786b5b 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) -- 2.43.0