Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sudip Mukherjee and committed by
Dmitry Torokhov
eb12a5f5 42beaccb

+1
+1
drivers/input/joystick/gamecon.c
··· 951 951 pads = gc_cfg[port_idx].args + 1; 952 952 n_pads = gc_cfg[port_idx].nargs - 1; 953 953 954 + memset(&gc_parport_cb, 0, sizeof(gc_parport_cb)); 954 955 gc_parport_cb.flags = PARPORT_FLAG_EXCL; 955 956 956 957 pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,