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 <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2739578
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Wenge Zhu 2023-09-14 10:33:54 +08:00 • committed by zhuwg1
commit c0f11fb588

View file

@ -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);
}