From 7b53da6fbd387f5e6091c792a267da7199c271f5 Mon Sep 17 00:00:00 2001 From: davidycchen Date: Mon, 7 Jun 2021 19:38:26 +0800 Subject: touch: common: modify the return value when register_tbn failed Return 0 when the tbn_context doesn't exist because tbn is not an always on feature. Bug: 186717670 Bug: 190339589 Test: flash boot and vendor_boot. Signed-off-by: davidycchen Change-Id: I4a842b53b4efaa89116ecedbabd82bbf1a311e71 --- touch_bus_negotiator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/touch_bus_negotiator.c b/touch_bus_negotiator.c index e7071b7..0bfbeab 100644 --- a/touch_bus_negotiator.c +++ b/touch_bus_negotiator.c @@ -183,8 +183,10 @@ int register_tbn(u32 *output) { u32 i = 0; - if (!tbn_context) - return -ENODEV; + if (!tbn_context) { + pr_warn("%s: tbn_context doesn't exist.", __func__); + return 0; + } mutex_lock(&tbn_context->dev_mask_mutex); for (i = 0; i < tbn_context->max_devices; i++) { -- cgit v1.2.3