From: Nick Dyer <nick.dyer@xxxxxxxxxxx> Signed-off-by: Nick Dyer <nick.dyer@xxxxxxxxxxx> (cherry picked from ndyer/linux/for-upstream commit d691d3ee6c6de84b38464a423207b3e23cb9dc3a) Signed-off-by: George G. Davis <george_davis@xxxxxxxxxx> Signed-off-by: Jiada Wang <jiada_wang@xxxxxxxxxx> --- drivers/input/touchscreen/atmel_mxt_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index ca882231ab41..a7805df83af2 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -3347,12 +3347,12 @@ static int mxt_load_fw(struct device *dev) return ret; } - ret = mxt_enter_bootloader(data); + /* Check for incorrect enc file */ + ret = mxt_check_firmware_format(dev, f.fw); if (ret) goto release_firmware; - /* Check for incorrect enc file */ - ret = mxt_check_firmware_format(dev, f.fw); + ret = mxt_enter_bootloader(data); if (ret) goto release_firmware; -- 2.19.2