public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug()
@ 2019-11-28  3:09 linmiaohe
  2019-11-28  8:50 ` Auger Eric
  0 siblings, 1 reply; 3+ messages in thread
From: linmiaohe @ 2019-11-28  3:09 UTC (permalink / raw)
  To: maz, pbonzini, rkrcmar, james.morse, julien.thierry.kdev,
	suzuki.poulose, christoffer.dall, catalin.marinas, eric.auger,
	gregkh, will, andre.przywara, tglx
  Cc: linmiaohe, kvm, kvmarm, linux-arm-kernel, linux-kernel

From: Miaohe Lin <linmiaohe@huawei•com>

The var ret and out jump label is not really needed. Clean them
up.
Signed-off-by: Miaohe Lin <linmiaohe@huawei•com>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-15 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <ab61de3a04a74f74866683b062d0bab2@huawei.com>
2020-01-15 13:58 ` [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug() Marc Zyngier
2019-11-28  3:09 linmiaohe
2019-11-28  8:50 ` Auger Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox