diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-11-17 20:33:29 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-11-17 21:00:13 +0300 |
commit | eb12a5f51f4332bd75a9d35caa4d79e8300af3a7 (patch) | |
tree | c21d8abc2c4b1eda360a1f46160cc426c47c6c2d /drivers/input/joystick | |
parent | 42beaccb2a66d7dc4a051a686122ed41c9a2ce1a (diff) | |
download | linux-eb12a5f51f4332bd75a9d35caa4d79e8300af3a7.tar.xz |
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')
-rw-r--r-- | drivers/input/joystick/gamecon.c | 1 |
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, |