mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
liquidio: add cleanup in octeon_setup_iq()
[ Upstream commit 6f967f8b1b ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2c3dd20f85
commit
f13b7ec5e1
@@ -238,8 +238,10 @@ int octeon_setup_iq(struct octeon_device *oct,
|
||||
}
|
||||
|
||||
oct->num_iqs++;
|
||||
if (oct->fn_list.enable_io_queues(oct))
|
||||
if (oct->fn_list.enable_io_queues(oct)) {
|
||||
octeon_delete_instr_queue(oct, iq_no);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user