summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/gamecon.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-11-17 09:33:29 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-11-17 10:00:13 -0800
commiteb12a5f51f4332bd75a9d35caa4d79e8300af3a7 (patch)
treec21d8abc2c4b1eda360a1f46160cc426c47c6c2d /drivers/input/joystick/gamecon.c
parent42beaccb2a66d7dc4a051a686122ed41c9a2ce1a (diff)
downloadlinux-eb12a5f51f4332bd75a9d35caa4d79e8300af3a7.tar.bz2
Input: gamecon - clear unused function pointers
gc_parport_cb is a local uninitialized structure and the member function pointers will be pointing to arbitrary locations unless they are cleared. Fixes: a517e87c3dfc ("Input: gamecon - 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/gamecon.c')
-rw-r--r--drivers/input/joystick/gamecon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 5a672dcac0d8..eae14d512353 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -951,6 +951,7 @@ static void gc_attach(struct parport *pp)
pads = gc_cfg[port_idx].args + 1;
n_pads = gc_cfg[port_idx].nargs - 1;
+ memset(&gc_parport_cb, 0, sizeof(gc_parport_cb));
gc_parport_cb.flags = PARPORT_FLAG_EXCL;
pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,