[PATCH v2 2/3] Input: gamecon - store object at correct index

2015-10-03 Thread Sudip Mukherjee
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 Fixes: a517e87c3dfc ("Input:

[PATCH v2 2/3] Input: gamecon - store object at correct index

2015-10-03 Thread Sudip Mukherjee
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 Fixes: