Skip to content

Commit

Permalink
Input: gpio-keys - fix possible NULL pointer dereference
Browse files Browse the repository at this point in the history
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: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Uwe Kleine-König authored and Dmitry Torokhov committed Jul 30, 2008
1 parent 558a171 commit 74dd439
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
unsigned int type = button->type ?: EV_KEY;

bdata->input = input;
bdata->button = button;
setup_timer(&bdata->timer,
gpio_check_button, (unsigned long)bdata);

Expand Down

0 comments on commit 74dd439

Please sign in to comment.