diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-07-29 00:46:38 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 08:33:19 +0300 |
commit | 95fb4eb6981216c07ac01f598e61b273b6eff58c (patch) | |
tree | f49aa652757c1f3eff434cd852ca626f3f044f3d | |
parent | 344f414fa0f16254dd07195d4cd11b2f92931d3d (diff) | |
download | blackbird-op-linux-95fb4eb6981216c07ac01f598e61b273b6eff58c.tar.gz blackbird-op-linux-95fb4eb6981216c07ac01f598e61b273b6eff58c.zip |
KVM: remove superfluous NULL pointer check in kvm_inject_pit_timer_irqs()
This takes care of the following entries from Dan's list:
arch/x86/kvm/i8254.c +714 kvm_inject_pit_timer_irqs(6) warning: variable derefenced in initializer 'vcpu'
arch/x86/kvm/i8254.c +714 kvm_inject_pit_timer_irqs(6) warning: variable derefenced before check 'vcpu'
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: corbet@lwn.net
Cc: eteo@redhat.com
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/x86/kvm/i8254.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 472653c15a2a..82ad523b4901 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -713,7 +713,7 @@ void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu) struct kvm *kvm = vcpu->kvm; struct kvm_kpit_state *ps; - if (vcpu && pit) { + if (pit) { int inject = 0; ps = &pit->pit_state; |