commit 4b3e910d7f upstream.
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: fd335ab04b ("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>
[bwh: Backported to 3.16:
- s/EDT_M06/M06/
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>