]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Input: adbhid - fix OOPS introduced by dynalloc conversion
authorPaul Mackerras <paulus@samba.org>
Mon, 31 Oct 2005 06:30:32 +0000 (01:30 -0500)
committerDmitry Torokhov <dtor_core@ameritech.net>
Mon, 31 Oct 2005 06:30:32 +0000 (01:30 -0500)
The problem is that adbhid[]->input is NULL, so the kernel oopses with
a null pointer dereference as soon as a key is pressed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/macintosh/adbhid.c

index cdb6d028319577ad6dc0293a66c87ad5538872f2..8f02c155fdc0e26693ce5babe3abe1b5e14221be 100644 (file)
@@ -723,6 +723,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
 
        sprintf(hid->phys, "adb%d:%d.%02x/input", id, default_id, original_handler_id);
 
+       hid->input = input_dev;
        hid->id = default_id;
        hid->original_handler_id = original_handler_id;
        hid->current_handler_id = current_handler_id;