Skip to contentSkip to conversation

drop unneeded check

PATCH Applied Gleb Natapov 2 participants 2 messages Feb 21, 2010 – Feb 22, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drop unneeded check

vcpu->run is initialized on vcpu creation and can never be NULL here.

arch/x86/kvm/x86.c +1 -1
index c58dc37..67fc95c 100644
@@ -3463,7 +3463,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
 	if (vcpu->arch.pio.string)
 		return EMULATE_DO_MMIO;
 
-	if ((r || vcpu->mmio_is_write) && run) {
+	if (r || vcpu->mmio_is_write) {
 		run->exit_reason = KVM_EXIT_MMIO;
 		run->mmio.phys_addr = vcpu->mmio_phys_addr;
 		memcpy(run->mmio.data, vcpu->mmio_data, 8);

--
Gleb.

Applied
#1 lore raw
Quoted 3 lines · Gleb Natapov

vcpu->run is initialized on vcpu creation and can never be NULL here.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function