linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: gpio-keys - fix possible NULL pointer dereference
@ 2008-07-30 13:27 Uwe Kleine-König
  2008-07-30 13:27 ` [PATCH] Input: gpio-keys - make gpio_keys_device_driver static Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2008-07-30 13:27 UTC (permalink / raw)
  To: linux-input; +Cc: Dmitry Baryshkov, Dmitry Torokhov

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>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
---
 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 be58730..1a92f4b 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);
 
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-30 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 13:27 [PATCH] Input: gpio-keys - fix possible NULL pointer dereference Uwe Kleine-König
2008-07-30 13:27 ` [PATCH] Input: gpio-keys - make gpio_keys_device_driver static Uwe Kleine-König
2008-07-30 13:32 ` [PATCH] Input: gpio-keys - fix possible NULL pointer dereference Uwe Kleine-König
2008-07-30 14:53 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).