From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugene Korenevsky Subject: [RFC PATCH 1/2] KVM: remove useless check of "ret" variable prior to returning the same value Date: Sun, 29 Mar 2015 01:27:17 +0300 Message-ID: <20150328222717.GA6508@gnote> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini To: kvm@vger.kernel.org Return-path: Received: from mail-lb0-f180.google.com ([209.85.217.180]:33857 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbbC1WXv (ORCPT ); Sat, 28 Mar 2015 18:23:51 -0400 Received: by lboc7 with SMTP id c7so28150072lbo.1 for ; Sat, 28 Mar 2015 15:23:50 -0700 (PDT) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: A trivial code cleanup. This `if` is redundant. Signed-off-by: Eugene Korenevsky --- arch/x86/kvm/emulate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 106c015..3a494f3 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -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, -- 2.0.5