Skip to content

Commit

Permalink
Input: stmfts - fix a & vs && typo
Browse files Browse the repository at this point in the history
[ Upstream commit d04afe1 ]

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

Fixes: 78bcac7 ("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>
  • Loading branch information
YueHaibing authored and gregkh committed Oct 29, 2020
1 parent 11f2a1d commit 18a1a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/stmfts.c
Expand Up @@ -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)
Expand Down

0 comments on commit 18a1a9c

Please sign in to comment.