summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2020-05-28 10:56:39 +0800
committerSuper Liu <supercjliu@google.com>2020-05-28 10:56:39 +0800
commit7539c8997d0eb5137c2402c17abbcbd75217a040 (patch)
tree3ff04b67f543c57c09382ead8f2ce55b369e33c5
parent639fc6ee26ef801686e6b6052d6be2a4bf98a579 (diff)
downloadsec_touch-7539c8997d0eb5137c2402c17abbcbd75217a040.tar.gz
sec_touch: check device is valid before execute sec_ts_remove()
Bug: 156978017 Change-Id: I5fea3b7b19e10c63a39ef143cb5d1af74be08007 Signed-off-by: Super Liu <supercjliu@google.com>
-rw-r--r--sec_ts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sec_ts.c b/sec_ts.c
index f5d90cb..ce8939b 100644
--- a/sec_ts.c
+++ b/sec_ts.c
@@ -4143,7 +4143,8 @@ static void sec_ts_shutdown(struct spi_device *client)
#endif
{
pr_info("%s\n", __func__);
- sec_ts_remove(client);
+ if (ts_dup)
+ sec_ts_remove(client);
}
int sec_ts_stop_device(struct sec_ts_data *ts)