diff options
author | Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> | 2008-07-30 16:33:43 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-30 16:40:35 +0200 |
commit | 74dd4393445ba37b79041d92de6ff7e7b68a4aec (patch) | |
tree | c223fdc1d9c5cd1d8217a782d0d0ed7dccf99832 /drivers/input | |
parent | Input: wm97xx - enable sub-drivers by default (diff) | |
download | linux-74dd4393445ba37b79041d92de6ff7e7b68a4aec.tar.xz linux-74dd4393445ba37b79041d92de6ff7e7b68a4aec.zip |
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: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index be58730e636a..1a92f4b04c17 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -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); |