summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-11-17 09:33:41 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-11-17 10:00:14 -0800
commit3855e9e4d30ed5207319fb5ef8b0fb416d873cbf (patch)
treedac5ed2d1194bb87d7842f0cb4fb340561b2c8f8 /drivers/input
parenteb12a5f51f4332bd75a9d35caa4d79e8300af3a7 (diff)
downloadlwn-3855e9e4d30ed5207319fb5ef8b0fb416d873cbf.tar.gz
lwn-3855e9e4d30ed5207319fb5ef8b0fb416d873cbf.zip
Input: turbografx - clear unused function pointers
tgfx_parport_cb is a local uninitialized structure and the member function pointers will be pointing to arbitrary locations unless they are cleared. Fixes: 4de27a638a99 ("Input: turbografx - 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')
-rw-r--r--drivers/input/joystick/turbografx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 9f5bca26bd2f..77f575dd0901 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -181,6 +181,7 @@ static void tgfx_attach(struct parport *pp)
n_buttons = tgfx_cfg[port_idx].args + 1;
n_devs = tgfx_cfg[port_idx].nargs - 1;
+ memset(&tgfx_parport_cb, 0, sizeof(tgfx_parport_cb));
tgfx_parport_cb.flags = PARPORT_FLAG_EXCL;
pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,