]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Input: stmfts - fix a & vs && typo
authorYueHaibing <yuehaibing@huawei.com>
Wed, 16 Sep 2020 17:26:09 +0000 (10:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:09 +0000 (10:08 +0100)
[ Upstream commit d04afe14b23651e7a8bc89727a759e982a8458e4 ]

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>
Link: https://lore.kernel.org/r/20200916141941.16684-1-yuehaibing@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/touchscreen/stmfts.c

index b54cc64e4ea64f632f3382fee15bb6bda491a55b..389356332c54a42a6be84f300014b07f6dfd908a 100644 (file)
@@ -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)