Input: cyttsp - error message on boot mode exit error
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 10 Apr 2021 07:31:12 +0000 (00:31 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 10 Apr 2021 07:45:50 +0000 (00:45 -0700)
Provide a proper error message when attempting to exit boot loader mode
and failing, which is something that happened to me.

Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210408131153.3446138-5-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/cyttsp_core.c

index c59aa6b8d257d916756ee2b974772fd289405217..4dc387659e2a4de1eb0ebb2ba7f2f6125248af46 100644 (file)
@@ -408,8 +408,10 @@ static int cyttsp_power_on(struct cyttsp *ts)
        if (GET_BOOTLOADERMODE(ts->bl_data.bl_status) &&
            IS_VALID_APP(ts->bl_data.bl_status)) {
                error = cyttsp_exit_bl_mode(ts);
-               if (error)
+               if (error) {
+                       dev_err(ts->dev, "failed to exit bootloader mode\n");
                        return error;
+               }
        }
 
        if (GET_HSTMODE(ts->bl_data.bl_file) != CY_OPERATE_MODE ||