]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] hpet: fix uninitialized variable in hpet_register()
authorClemens Ladisch <clemens@ladisch.de>
Sun, 30 Oct 2005 23:03:39 +0000 (15:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:30 +0000 (17:37 -0800)
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>
drivers/char/hpet.c

index bc5ee99b9c23787594677fa0a5eac4364b732a0d..73e6614cdf848d66b12a79ff322830d7ac022216 100644 (file)
@@ -587,6 +587,8 @@ int hpet_register(struct hpet_task *tp, int periodic)
                return -EINVAL;
        }
 
+       tp->ht_opaque = NULL;
+
        spin_lock_irq(&hpet_task_lock);
        spin_lock(&hpet_lock);