diff mbox series

[-next] Input: stmfts - Fix a & vs && typo

Message ID 20200916141941.16684-1-yuehaibing@huawei.com
State New
Headers show
Series [-next] Input: stmfts - Fix a & vs && typo | expand

Commit Message

Yue Haibing Sept. 16, 2020, 2:19 p.m. UTC
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(-)

Comments

Andi Shyti Sept. 16, 2020, 4:31 p.m. UTC | #1
Hi YueHaibing,

On Wed, Sep 16, 2020 at 10:19:41PM +0800, YueHaibing wrote:
> 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>


Reviewed-by: Andi Shyti <andi@etezian.org>


Thanks,
Andi
Dmitry Torokhov Sept. 16, 2020, 5:29 p.m. UTC | #2
On Wed, Sep 16, 2020 at 10:19:41PM +0800, YueHaibing wrote:
> 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>


Applied, thank you.

-- 
Dmitry
diff mbox series

Patch

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)