提交 74dd4393 编写于 作者: U Uwe Kleine-König 提交者: Dmitry Torokhov

Input: gpio-keys - fix possible NULL pointer dereference

bdata->button is used in gpio_check_button but never initialized.  Having a
device with debounce_interval != 0 without this patch resulted on an oops on
my machine.
Signed-off-by: NUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 558a171d
...@@ -118,6 +118,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) ...@@ -118,6 +118,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
unsigned int type = button->type ?: EV_KEY; unsigned int type = button->type ?: EV_KEY;
bdata->input = input; bdata->input = input;
bdata->button = button;
setup_timer(&bdata->timer, setup_timer(&bdata->timer,
gpio_check_button, (unsigned long)bdata); gpio_check_button, (unsigned long)bdata);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册