Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75cef4fc authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

bnx2x: fix an error code in bnx2x_nic_load()



[ Upstream commit fb653827c758725b149b5c924a5eb50ab4812750 ]

Set the error code if bnx2x_alloc_fw_stats_mem() fails.  The current
code returns success.

Fixes: ad5afc89 ("bnx2x: Separate VF and PF logic")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 437ee90d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2666,7 +2666,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
	}

	/* Allocated memory for FW statistics  */
	if (bnx2x_alloc_fw_stats_mem(bp))
	rc = bnx2x_alloc_fw_stats_mem(bp);
	if (rc)
		LOAD_ERROR_EXIT(bp, load_error0);

	/* request pf to initialize status blocks */