From c0f11fb5886cbebfeb746d1e93c538d7581286a1 Mon Sep 17 00:00:00 2001 From: Wenge Zhu Date: Thu, 14 Sep 2023 10:33:54 +0800 Subject: [PATCH] Fix goodix touch driver build error Fix goodix touch driver build error due to compiler optimization level: goodix_ts_log_capture.c:36:6: error: variable 'ret' set but not used Change-Id: Iaec12d4ee42285ce04ca5a3685399855752ed36a Signed-off-by: Wenge Zhu Reviewed-on: https://gerrit.mot.com/2739578 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou Submit-Approved: Jira Key --- .../touchscreen/goodix_berlin_mmi/goodix_ts_log_capture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_log_capture.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_log_capture.c index e49e1f977b72..6c38e56e8519 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_log_capture.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_log_capture.c @@ -33,7 +33,6 @@ static struct goodix_ts_log ts_log_dev; /* Save a byte to a FIFO and discard the oldest byte if FIFO is full */ void put_fifo_with_discard(char *log_buf, int len) { - int ret = 0; if (!kfifo_initialized(&ts_log_dev.fifo)) return; if (kfifo_is_full(&ts_log_dev.fifo)) { @@ -41,7 +40,7 @@ void put_fifo_with_discard(char *log_buf, int len) ts_info("Save a byte to a FIFO and discard the oldest byte if FIFO is full"); } - ret = kfifo_in(&ts_log_dev.fifo, log_buf, len); + kfifo_in(&ts_log_dev.fifo, log_buf, len); wake_up_interruptible(&ts_log_dev.wq); }