Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6290074ybc; Wed, 27 Nov 2019 19:11:25 -0800 (PST) X-Google-Smtp-Source: APXvYqwUpRt9XfgEcPU17LOYUSHSmVSjA5jYDwYt/TMTFB1+eciGrAGxCQbGdHOckVgRkBKeacQ4 X-Received: by 2002:aa7:c0c8:: with SMTP id j8mr35482973edp.235.1574910685184; Wed, 27 Nov 2019 19:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574910685; cv=none; d=google.com; s=arc-20160816; b=TxnrQZ9BIbnHgvkL9u/lvlEHxcUFDWgof/YkfpwFYqsMZuC8gFFr6gLjzxRh4yu6Az x9ohQvtJjax2/776Lt73+RYJE43u3YQpBZjJaCrelYnoG1ChrQFvvVCVfctAVtzNkMJ6 /7svWnJUVi0cJ2vQpAapnmW2LDnrmbFSC8w6IdZdLjXcuejNuYeVkP/gFZfRjZjTEPvb g1DMVwssrRxls4oDtbLNeE5Xk7DeNM2c45YE9cIezMoRzwcswRvWpYN/KWfFL5JR7f33 kc8C4ciouiGsuAhqhQHgzkSakwS9nNcjLmaxwbvCXLU85NsJbOS1iCyTYmKRzXzhgtyF Fwgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=hCW+5h8tarqnb5/303KYhh0TeBbEnnU8FwRCo8s7Oco=; b=S95HwwTxzGiZ+RxiyqwbiyoUH8lOuN/ICzwyQwvk0ZTx59lieBoPbCHn10DxWrWMq/ p5xqc3kEE7jXxbmvTxZzC4kppVr11pkpPnncSuiEyGWQQremLC7u7VQYtXa1hQVMzmfh ic6tgd2mLkd9Hf/DaBUjwUtuOlSKyx7u+D4G0di/Z6auvXpAA25RzekKiGbHHSe59uRR 1qwUi6xrdtyT++uPWW9mM/klZ+GzdM+z0HvxXAXGBUFMQQ4INi0j4FzJp4LsO5jDZXrv ySB5ZF4p2jR5GspLiSX92PpmrFc0Rnz5Ryc681Aa93ChQW1kWct5le5z2txuRwjo2M3j CU7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bm18si11916394edb.74.2019.11.27.19.11.01; Wed, 27 Nov 2019 19:11:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727680AbfK1DJt (ORCPT + 99 others); Wed, 27 Nov 2019 22:09:49 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:37220 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727616AbfK1DJs (ORCPT ); Wed, 27 Nov 2019 22:09:48 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 856BAF4DD1C48B2C5754; Thu, 28 Nov 2019 11:09:46 +0800 (CST) Received: from huawei.com (10.175.105.18) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Thu, 28 Nov 2019 11:09:39 +0800 From: linmiaohe To: , , , , , , , , , , , , CC: , , , , Subject: [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug() Date: Thu, 28 Nov 2019 11:09:42 +0800 Message-ID: <1574910582-14405-1-git-send-email-linmiaohe@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.105.18] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaohe Lin The var ret and out jump label is not really needed. Clean them up. Signed-off-by: Miaohe Lin --- arch/arm64/kvm/guest.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index 2fff06114a8f..3b836c91609e 100644 --- a/arch/arm64/kvm/guest.c +++ b/arch/arm64/kvm/guest.c @@ -834,14 +834,10 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg) { - int ret = 0; - trace_kvm_set_guest_debug(vcpu, dbg->control); - if (dbg->control & ~KVM_GUESTDBG_VALID_MASK) { - ret = -EINVAL; - goto out; - } + if (dbg->control & ~KVM_GUESTDBG_VALID_MASK) + return -EINVAL; if (dbg->control & KVM_GUESTDBG_ENABLE) { vcpu->guest_debug = dbg->control; @@ -856,8 +852,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, vcpu->guest_debug = 0; } -out: - return ret; + return 0; } int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu, -- 2.19.1