summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-11-17 20:33:14 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-11-17 21:00:12 +0300
commit42beaccb2a66d7dc4a051a686122ed41c9a2ce1a (patch)
tree142361cacb758155df858cd8109d4a10506b0399 /drivers/input
parentbbdb5c22e12507e7f1637091bc24fe4d33e128e5 (diff)
downloadlinux-42beaccb2a66d7dc4a051a686122ed41c9a2ce1a.tar.xz
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 <sudip@vectorindia.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/db9.c1
1 files changed, 1 insertions, 0 deletions
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);