]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 6 Aug 2017 22:00:17 +0000 (00:00 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 19 Sep 2017 05:32:45 +0000 (22:32 -0700)
commit3f4c3d8c21bb010829cb565b900cb31fb3f2afa5
tree4158cdc6b9173e098dd695552152ed6481fbfb00
parentdfe39869f1d659b96f1de218b5467b47abc83922
qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()'

Orabug: 26783820

We allocate 'p_info->mfw_mb_cur' and 'p_info->mfw_mb_shadow' but we check
'p_info->mfw_mb_addr' instead of 'p_info->mfw_mb_cur'.

'p_info->mfw_mb_addr' is never 0, because it is initiliazed a few lines
above in 'qed_load_mcp_offsets()'.

Update the test and check the result of the 2 'kzalloc()' instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit eb2a6b800c2d1336cce6709d48c42753a611c07b ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_mcp.c