]> git.baikalelectronics.ru Git - kernel.git/commit
Input: gamecon - store object at correct index
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 6 Oct 2015 00:22:58 +0000 (17:22 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Oct 2015 00:34:56 +0000 (17:34 -0700)
commitbac8d4734d7ffa52a700fd09309aa52e9818d77e
tree7c494078f5660f9b966498476adfafce6b5845f2
parent9a3c4eef53a68cb711c538eca4bb97dc5ca41b70
Input: gamecon - store object at correct index

The variable i is used to check the port to attach to and we are
supposed to save the reference of struct gc in the location given by
gc_base[i]. But after finding out the index, i is getting modified again
so we saved in a wrong index.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 0c517325bfe2 ("Input: gamecon - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/gamecon.c