mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-05 17:01:17 +00:00
vmci: fix duplicated code for different branches
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1226762 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
006dbb38d7
commit
234b7f8d3b
@ -2235,14 +2235,8 @@ int vmci_qp_broker_detach(struct vmci_handle handle, struct vmci_ctx *context)
|
|||||||
handle.context, handle.resource,
|
handle.context, handle.resource,
|
||||||
result);
|
result);
|
||||||
|
|
||||||
if (entry->vmci_page_files)
|
qp_host_unregister_user_memory(entry->produce_q,
|
||||||
qp_host_unregister_user_memory(entry->produce_q,
|
entry->consume_q);
|
||||||
entry->
|
|
||||||
consume_q);
|
|
||||||
else
|
|
||||||
qp_host_unregister_user_memory(entry->produce_q,
|
|
||||||
entry->
|
|
||||||
consume_q);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user