linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] Input: stmfts - Fix a & vs && typo
@ 2020-09-16 14:19 YueHaibing
  2020-09-16 16:31 ` Andi Shyti
  2020-09-16 17:29 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-09-16 14:19 UTC (permalink / raw)
  To: dmitry.torokhov, mcoquelin.stm32, alexandre.torgue, andi, javier,
	robh
  Cc: linux-input, linux-stm32, linux-arm-kernel, linux-kernel,
	YueHaibing

In stmfts_sysfs_hover_enable_write(), we should check
value and sdata->hover_enabled is all true.

Fixes: 78bcac7b2ae1 ("Input: add support for the STMicroelectronics FingerTip touchscreen")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/input/touchscreen/stmfts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c
index df946869d4cd..9a64e1dbc04a 100644
--- a/drivers/input/touchscreen/stmfts.c
+++ b/drivers/input/touchscreen/stmfts.c
@@ -479,7 +479,7 @@ static ssize_t stmfts_sysfs_hover_enable_write(struct device *dev,
 
 	mutex_lock(&sdata->mutex);
 
-	if (value & sdata->hover_enabled)
+	if (value && sdata->hover_enabled)
 		goto out;
 
 	if (sdata->running)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-16 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 14:19 [PATCH -next] Input: stmfts - Fix a & vs && typo YueHaibing
2020-09-16 16:31 ` Andi Shyti
2020-09-16 17:29 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).