public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drop unneeded check
@ 2010-02-21 13:00 Gleb Natapov
  2010-02-22  8:55 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2010-02-21 13:00 UTC (permalink / raw)
  To: avi, mtosatti; +Cc: kvm

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

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c58dc37..67fc95c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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.

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

* Re: [PATCH] drop unneeded check
  2010-02-21 13:00 [PATCH] drop unneeded check Gleb Natapov
@ 2010-02-22  8:55 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-02-22  8:55 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: mtosatti, kvm

On 02/21/2010 03:00 PM, Gleb Natapov wrote:
> vcpu->run is initialized on vcpu creation and can never be NULL
> here.
>    

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


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

end of thread, other threads:[~2010-02-22  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-21 13:00 [PATCH] drop unneeded check Gleb Natapov
2010-02-22  8:55 ` Avi Kivity

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