qed: Fix memory/entry leak in qed_init_sp_request()
authorDenis Bolotin <denis.bolotin@cavium.com>
Thu, 8 Nov 2018 14:46:08 +0000 (16:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:09:39 +0000 (16:09 +0100)
commit897d6d429b6cfc1098e93c41f88f8d5d2f16157a
treefc94822897564de468ee92e295cd54601c75f408
parentd05e26d49ed30201299ca60eec2de3872d43a3d2
qed: Fix memory/entry leak in qed_init_sp_request()

[ Upstream commit 39477551df940ddb1339203817de04f5caaacf7a ]

Free the allocated SPQ entry or return the acquired SPQ entry to the free
list in error flows.

Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_sp_commands.c