From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 3/5] Input: turbografx - clear unused function pointers
Date: Tue, 17 Nov 2015 19:10:17 +0530 [thread overview]
Message-ID: <1447767619-28329-3-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1447767619-28329-1-git-send-email-sudipm.mukherjee@gmail.com>
tgfx_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.
Fixes: 4de27a638a99 ("Input: turbografx - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/input/joystick/turbografx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 9f5bca2..77f575d 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -181,6 +181,7 @@ static void tgfx_attach(struct parport *pp)
n_buttons = tgfx_cfg[port_idx].args + 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;
pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,
--
1.9.1
next prev parent reply other threads:[~2015-11-17 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
2015-11-17 13:40 ` Sudip Mukherjee [this message]
2015-11-17 13:40 ` [PATCH 4/5] Input: walkera0701 " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 5/5] Input: parkbd " Sudip Mukherjee
2015-11-17 18:00 ` [PATCH 1/5] Input: db9 " Dmitry Torokhov
2015-11-20 8:34 ` Sudip Mukherjee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447767619-28329-3-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).