Skip to content

Commit

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

Fixes: 221bcb2 ("Input: walkera0701 - 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 3855e9e commit d1f2a03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/joystick/walkera0701.c
Original file line number Diff line number Diff line change
@@ -218,6 +218,7 @@ static void walkera0701_attach(struct parport *pp)

w->parport = pp;

memset(&walkera0701_parport_cb, 0, sizeof(walkera0701_parport_cb));
walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL;
walkera0701_parport_cb.irq_func = walkera0701_irq_handler;
walkera0701_parport_cb.private = w;

0 comments on commit d1f2a03

Please sign in to comment.