Commit 6f967f8b authored by Wenwen Wang's avatar Wenwen Wang Committed by David S. Miller

liquidio: add cleanup in octeon_setup_iq()

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: default avatarWenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b24a441
...@@ -237,8 +237,10 @@ int octeon_setup_iq(struct octeon_device *oct, ...@@ -237,8 +237,10 @@ int octeon_setup_iq(struct octeon_device *oct,
} }
oct->num_iqs++; 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 1;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment