diff mbox series

[3/7] Input: cyttsp - Error message on boot mode exit error

Message ID 20210330085424.2244653-4-linus.walleij@linaro.org (mailing list archive)
State New
Headers show
Series Input: cyttsp - First round of modernizations | expand

Commit Message

Linus Walleij March 30, 2021, 8:54 a.m. UTC
Provide a proper error message when attempting to exit
boot loader mode and failing, which is something that
happened to me.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/input/touchscreen/cyttsp_core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Javier Martinez Canillas March 30, 2021, 10:56 a.m. UTC | #1
On Tue, Mar 30, 2021 at 10:54 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> Provide a proper error message when attempting to exit
> boot loader mode and failing, which is something that
> happened to me.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c
index a19d7cce95ca..91f8f38b3f06 100644
--- a/drivers/input/touchscreen/cyttsp_core.c
+++ b/drivers/input/touchscreen/cyttsp_core.c
@@ -410,8 +410,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 ||