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: a517e87c3d
("Input: gamecon - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
42beaccb2a
commit
eb12a5f51f
1 changed files with 1 additions and 0 deletions
|
@ -951,6 +951,7 @@ static void gc_attach(struct parport *pp)
|
||||||
pads = gc_cfg[port_idx].args + 1;
|
pads = gc_cfg[port_idx].args + 1;
|
||||||
n_pads = gc_cfg[port_idx].nargs - 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;
|
gc_parport_cb.flags = PARPORT_FLAG_EXCL;
|
||||||
|
|
||||||
pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,
|
pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,
|
||||||
|
|
Loading…
Add table
Reference in a new issue