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: 2260c419b5 ("Input: db9 - 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:
Sudip Mukherjee 2015-11-17 09:33:14 -08:00 committed by Dmitry Torokhov
parent bbdb5c22e1
commit 42beaccb2a
1 changed files with 1 additions and 0 deletions

View File

@ -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);