Input: parkbd - clear unused function pointers
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 17 Nov 2015 17:33:58 +0000 (09:33 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 17 Nov 2015 18:00:16 +0000 (10:00 -0800)
parkbd_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 33ca8ab97cbb ("Input: parkbd - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/parkbd.c

index 92c31b8f8fb489c317013f1cf77f133993fcc321..1edfac78d4ac742a8fe6d6183660c45652381804 100644 (file)
@@ -145,6 +145,7 @@ static int parkbd_getport(struct parport *pp)
 {
        struct pardev_cb parkbd_parport_cb;
 
+       memset(&parkbd_parport_cb, 0, sizeof(parkbd_parport_cb));
        parkbd_parport_cb.irq_func = parkbd_interrupt;
        parkbd_parport_cb.flags = PARPORT_FLAG_EXCL;