From: Sudip Mukherjee Date: Tue, 17 Nov 2015 17:33:14 +0000 (-0800) Subject: Input: db9 - clear unused function pointers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42beaccb2a66d7dc4a051a686122ed41c9a2ce1a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Input: db9 - clear unused function pointers db9_parport_cb is a local uninitialized structure and the member function pointers will be pointing to arbitrary locations unless they are cleared. Fixes: 2260c419b52b ("Input: db9 - use parallel port device model") Signed-off-by: Sudip Mukherjee Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 932d07307454..da326090c2b0 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -592,6 +592,7 @@ static void db9_attach(struct parport *pp) return; } + memset(&db9_parport_cb, 0, sizeof(db9_parport_cb)); db9_parport_cb.flags = PARPORT_FLAG_EXCL; pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);