diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-07-28 18:46:38 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:33:19 -0400 |
commit | 95fb4eb6981216c07ac01f598e61b273b6eff58c (patch) | |
tree | f49aa652757c1f3eff434cd852ca626f3f044f3d /arch | |
parent | 344f414fa0f16254dd07195d4cd11b2f92931d3d (diff) |
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>
Diffstat (limited to 'arch')
-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) | |||
713 | struct kvm *kvm = vcpu->kvm; | 713 | struct kvm *kvm = vcpu->kvm; |
714 | struct kvm_kpit_state *ps; | 714 | struct kvm_kpit_state *ps; |
715 | 715 | ||
716 | if (vcpu && pit) { | 716 | if (pit) { |
717 | int inject = 0; | 717 | int inject = 0; |
718 | ps = &pit->pit_state; | 718 | ps = &pit->pit_state; |
719 | 719 | ||