aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-04-26 14:12:26 +0100
committerKeir Fraser <keir@xen.org>2011-04-26 14:12:26 +0100
commitb2fa72f6e75d5188120244a7cc3d42362d2a7d57 (patch)
tree7e423be3d68770e46fe04d1ef0a0ae27bae169c1
parenta6a3bf803986847f8a1161fcd72200dfb5d6fd81 (diff)
downloadxen-b2fa72f6e75d5188120244a7cc3d42362d2a7d57.tar.gz
xen-b2fa72f6e75d5188120244a7cc3d42362d2a7d57.tar.bz2
xen-b2fa72f6e75d5188120244a7cc3d42362d2a7d57.zip
x86: Bail from hpet_disable_legacy_broadcast() if legacy_hpet_event is uninitialised.
Signed-off-by: Keir Fraser <keir@xen.org> xen-4.1-testing changeset: 23034:7c7ef1b6f4e5 xen-4.1-testing date: Tue Apr 26 14:11:18 2011 +0100
-rw-r--r--xen/arch/x86/hpet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index c47b527035..99213f5da5 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -624,6 +624,9 @@ void hpet_disable_legacy_broadcast(void)
u32 cfg;
unsigned long flags;
+ if ( !legacy_hpet_event.shift )
+ return;
+
spin_lock_irqsave(&legacy_hpet_event.lock, flags);
legacy_hpet_event.flags |= HPET_EVT_DISABLE;