Browse Source

Input: walkera0701 - clear unused function pointers

walkera0701_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 221bcb24c653 ("Input: walkera0701 - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Sudip Mukherjee 9 years ago
parent
commit
d1f2a031ab
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/input/joystick/walkera0701.c

+ 1 - 0
drivers/input/joystick/walkera0701.c

@@ -218,6 +218,7 @@ static void walkera0701_attach(struct parport *pp)
 
 
 	w->parport = pp;
 	w->parport = pp;
 
 
+	memset(&walkera0701_parport_cb, 0, sizeof(walkera0701_parport_cb));
 	walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL;
 	walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL;
 	walkera0701_parport_cb.irq_func = walkera0701_irq_handler;
 	walkera0701_parport_cb.irq_func = walkera0701_irq_handler;
 	walkera0701_parport_cb.private = w;
 	walkera0701_parport_cb.private = w;