summaryrefslogtreecommitdiff
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-11-17 20:33:48 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-11-17 21:00:15 +0300
commitd1f2a031ab902020393dc1dc2d721ea95578b5a8 (patch)
treef9cfa3924311acb62b170a6877f7d060b5feeb51 /drivers/input/joystick
parent3855e9e4d30ed5207319fb5ef8b0fb416d873cbf (diff)
downloadlinux-d1f2a031ab902020393dc1dc2d721ea95578b5a8.tar.xz
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>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/walkera0701.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c
index d88f5dd3c9d9..413e343f55f7 100644
--- a/drivers/input/joystick/walkera0701.c
+++ b/drivers/input/joystick/walkera0701.c
@@ -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;