Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 234b7f8d authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Greg Kroah-Hartman
Browse files

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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 006dbb38
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -2235,14 +2235,8 @@ int vmci_qp_broker_detach(struct vmci_handle handle, struct vmci_ctx *context)
					handle.context, handle.resource,
					result);

			if (entry->vmci_page_files)
			qp_host_unregister_user_memory(entry->produce_q,
							       entry->
							       consume_q);
			else
				qp_host_unregister_user_memory(entry->produce_q,
							       entry->
							       consume_q);
						       entry->consume_q);

		}