]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Input: db9 - store object at correct index
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 6 Oct 2015 00:22:47 +0000 (17:22 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Oct 2015 00:34:56 +0000 (17:34 -0700)
commitdd23bf1044e89f46e2d1af9725c0b24864309082
tree8ff881f7a83beab6e05dd9aff2e9010ef9bd503e
parent92deea1350f9fa97a841d45cd1f8228d5e8aa667
Input: db9 - 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 db9 in the location given by
db9_base[i]. But after finding out the index, i is getting modified again
so we saved in a wrong index.
While at it mark db9_base[i] as NULL after it is freed.

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>
drivers/input/joystick/db9.c