KVM: remove useless check of "ret" variable prior to returning the same value
RFC PATCH 1/2 KVM: remove useless check of "ret" variable prior to returning the same value
A trivial code cleanup. This if is redundant.
Signed-off-by Eugene Korenevsky <[email protected]>
--- arch/x86/kvm/emulate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/x86/kvm/emulate.c +1 -3
@@ -2782,10 +2782,8 @@ static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt,return ret; ret =__load_segment_descriptor (ctxt, tss->gs,VCPU_SREG_GS , cpl,X86_TRANSFER_TASK_SWITCH ,NULL ); -if (ret !=X86EMUL_CONTINUE ) -return ret; -return X86EMUL_CONTINUE ; +return ret; } static int task_switch_32(struct x86_emulate_ctxt *ctxt,
Signature · 1 line
2.0.5
Paolo Bonzini
maintainerQuoted 14 lines · Eugene Korenevsky
A trivial code cleanup. This
ifis redundant.Signed-off-by Eugene Korenevsky <[email protected]>--- arch/x86/kvm/emulate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/x86/kvm/emulate.c +0
-0@@ -2782,10 +2782,8 @@ static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt,return ret;
arch/x86/kvm/emulate.c static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt, · line 2789
Quoted 10 lines
arch/x86/kvm/emulate.c +1
-3ret =__load_segment_descriptor (ctxt, tss->gs,VCPU_SREG_GS , cpl,X86_TRANSFER_TASK_SWITCH ,NULL ); -if (ret !=X86EMUL_CONTINUE ) -return ret; -return X86EMUL_CONTINUE ; +return ret; } static int task_switch_32(struct x86_emulate_ctxt *ctxt,
Applied this one for now.
Paolo