From f0d788752f851bf8cfcfcf8d08c8153826bbe24f Mon Sep 17 00:00:00 2001 From: hujing3 Date: Wed, 22 Jul 2020 16:27:59 +0800 Subject: [PATCH] focaltech_0flash_mmi: ft fw file not found Cebu focaltech touch invalid, tp fw name match fail Recover fwname logic which is deleted by (CR):1687856 NO_PROP_NEEDED: 1687856 not merged to shm2018 Change-Id: I13500d1a4caa57882d10320332d2c0e6b164ece4 Signed-off-by: hujing3 Reviewed-on: https://gerrit.mot.com/1700585 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- .../input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c index 13cb75849918..47e6d9b7fa02 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_ex_fun.c @@ -1131,6 +1131,7 @@ static ssize_t doreflash_store(struct device *dev, memset(fwname, 0, sizeof(fwname)); scnprintf(fwname, sizeof(fwname), "%s", buf); + fwname[count - 1] = '\0'; mutex_lock(&input_dev->mutex); fts_fw_update_vendor_name(fwname);