提交 7522e4ec 编写于 作者: C Clemens Ladisch 提交者: Linus Torvalds

[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: NClemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 af95eade
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册