diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-11-17 18:33:14 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-11-17 19:00:12 +0100 |
commit | 42beaccb2a66d7dc4a051a686122ed41c9a2ce1a (patch) | |
tree | 142361cacb758155df858cd8109d4a10506b0399 /drivers/input/joystick | |
parent | Merge branch 'next' into for-linus (diff) | |
download | linux-42beaccb2a66d7dc4a051a686122ed41c9a2ce1a.tar.xz linux-42beaccb2a66d7dc4a051a686122ed41c9a2ce1a.zip |
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/joystick')
-rw-r--r-- | drivers/input/joystick/db9.c | 1 |
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); |