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 6250C7CF27; Wed, 21 Feb 2024 14:25:22 +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=1708525522; cv=none; b=VN3WrQN+wXohml1s4CsgxRG6azo03GQH/vDya+/iM5Z5/mn5I9vQc1W4CA1+nxbXwRCaIG1JOiZymvSmfMH7w2JSpEaSVm5K2UHlmMtecY5VE7B0a0YWGO+8mNJnt2RXQoGRkaiyV0C3rBV3EwTEmQeo4zsWcgjV8vzEuufE6aQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708525522; c=relaxed/simple; bh=WiQE+qRYq0QIyFA0CoDr/xg38Ekucp3O6OlSWSN0p0U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HmKnd92eClQUAi0iebEkyy1/OSCrD7rhXi8B6qdYCj07rLKdZocfuuG3aMKNIpX0tBCv2Rhxd7jW0hpI3PUKk1pWTWj4GrufhWIVxqclLdKHPTEMAtnhjUExk+5AOCPloWQ8BSY1KgEREpqUAUIwsB2d+eHUQ6JLl7bkdIQoiYg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uAEU3yZF; 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="uAEU3yZF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4617C43390; Wed, 21 Feb 2024 14:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708525522; bh=WiQE+qRYq0QIyFA0CoDr/xg38Ekucp3O6OlSWSN0p0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uAEU3yZFCjEPFipZi46FhouJNIZ1FjcLjELM8FqTFNokibhiPnrCUuqixNYpdpdge iKsF8mKxhDITZ1/3ILmGcXsgo1Qn3y+xXUttmi2IKzSRl2sZaMqM2orz4Zjagly87D J9g/yAp9uRLUkPNKNO4uTW42JC8CgEAeZ/ShC3x4= 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.4 164/267] ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550() Date: Wed, 21 Feb 2024 14:08:25 +0100 Message-ID: <20240221125945.250853869@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125940.058369148@linuxfoundation.org> References: <20240221125940.058369148@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.4-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 7d3da1e823dc..48b95f0bca4e 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