From ffb8499504e3a3d065bd44fdc1e15d0e6b74ce9f Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 14 Mar 2017 12:26:26 +0100 Subject: [PATCH] x86emul: fold exit paths Move "cannot_emulate" and make it go through the common (error) exit path. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/x86_emulate/x86_emulate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index cbbfe5c01c..0cbeb31db4 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -7780,7 +7780,9 @@ x86_emulate( } default: - goto cannot_emulate; + cannot_emulate: + rc = X86EMUL_UNHANDLEABLE; + goto done; } if ( state->simd_size ) @@ -7924,11 +7926,6 @@ x86_emulate( _put_fpu(); put_stub(stub); return rc; - - cannot_emulate: - _put_fpu(); - put_stub(stub); - return X86EMUL_UNHANDLEABLE; #undef state } -- 2.30.2