aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-10-30 18:03:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:30 -0500
commit7522e4ecdfdf86b9816f06d55766a6f88baa0348 (patch)
tree16a0260bd1e8ec2c848a85a50d7582a7dfec7a2f /drivers
parentaf95eade68da4dfa29c5b64d79cffc9709facf00 (diff)
[PATCH] hpet: fix uninitialized variable in hpet_register()
Clear the ht_opaque field in the hpet_register() function before searching for a free timer to prevent the function from incorrectly assuming that the search succeeded afterwards. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Bob Picco <bob.picco@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hpet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index bc5ee99b9c23..73e6614cdf84 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -587,6 +587,8 @@ int hpet_register(struct hpet_task *tp, int periodic)
587 return -EINVAL; 587 return -EINVAL;
588 } 588 }
589 589
590 tp->ht_opaque = NULL;
591
590 spin_lock_irq(&hpet_task_lock); 592 spin_lock_irq(&hpet_task_lock);
591 spin_lock(&hpet_lock); 593 spin_lock(&hpet_lock);
592 594