Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3855e9e4 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Dmitry Torokhov
Browse files

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: 4de27a63 ("Input: turbografx - use parallel port device model")
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent eb12a5f5
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -181,6 +181,7 @@ static void tgfx_attach(struct parport *pp)
	n_buttons = tgfx_cfg[port_idx].args + 1;
	n_buttons = tgfx_cfg[port_idx].args + 1;
	n_devs = tgfx_cfg[port_idx].nargs - 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;
	tgfx_parport_cb.flags = PARPORT_FLAG_EXCL;


	pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,
	pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,