liquidio: add cleanup in octeon_setup_iq()
authorWenwen Wang <wenwen@cs.uga.edu>
Wed, 14 Aug 2019 05:14:49 +0000 (00:14 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:32:15 +0000 (10:32 +0100)
commitf782d1caab35bba26e5d91340a19b71486adafb8
tree9fc0214aff2e24a2c1a6b5949f6b9dec4cdd5fe9
parent8762d3ea41b68bcd98a2b32daab2e32a1d746a6a
liquidio: add cleanup in octeon_setup_iq()

[ Upstream commit 6f967f8b1be7001b31c46429f2ee7d275af2190f ]

If oct->fn_list.enable_io_queues() fails, no cleanup is executed, leading
to memory/resource leaks. To fix this issue, invoke
octeon_delete_instr_queue() before returning from the function.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/cavium/liquidio/request_manager.c