Skip to content

Commit

Permalink
Input: parkbd - clear unused function pointers
Browse files Browse the repository at this point in the history
parkbd_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 33ca8ab ("Input: parkbd - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Sudip Mukherjee authored and Dmitry Torokhov committed Nov 17, 2015
1 parent d1f2a03 commit 0c6da07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/serio/parkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0c6da07

Please sign in to comment.