From ca818526c32e8757d8e3033445a7f867fd210d76 Mon Sep 17 00:00:00 2001 From: Satya Rama Aditya Pinapala Date: Tue, 29 Sep 2020 21:06:10 -0700 Subject: [PATCH] disp: msm: dsi: fix return value for alter_esd_check_mode The file operation write expects a non zero return value for a successful exit from the file op. Change-Id: I5e956333f39c33708ba24e2722713484c613f0ee Signed-off-by: Satya Rama Aditya Pinapala --- msm/dsi/dsi_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 48b2af9dba69..89379016f34f 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -1517,12 +1517,15 @@ static ssize_t debugfs_alter_esd_check_mode(struct file *file, goto error; } - if (!esd_config->esd_enabled) + if (!esd_config->esd_enabled) { + rc = -EINVAL; goto error; + } if (!strcmp(buf, "te_signal_check\n")) { if (display->panel->panel_mode == DSI_OP_VIDEO_MODE) { DSI_INFO("TE based ESD check for Video Mode panels is not allowed\n"); + rc = -EINVAL; goto error; } DSI_INFO("ESD check is switched to TE mode by user\n");