Input: edt-ft5x06 - fix error handling for factory mode on non-M06
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 23 Jan 2018 18:01:57 +0000 (10:01 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 24 Jan 2018 22:43:10 +0000 (14:43 -0800)
commit4b3e910d7f430ab76dd37131bb75129878950163
treefc3c4400a8579b3ec0a64b054636605df726582a
parentcba04cdf437d745fac85220d1d692a9ae23d7004
Input: edt-ft5x06 - fix error handling for factory mode on non-M06

When attempting enter factory mode on firmware that does not support it,
we'd error out, but leave the device with interrupts disabled, and thus
touch not working. Fix it by moving the check before we disable
interrupts/allocate memory for debug buffers.

Fixes: fd335ab04b3f ("Input: edt-ft5x06 - add support for M09 firmware version")
Reviewed-by: Andi Shyti <andi@etezian.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/edt-ft5x06.c