From patchwork Tue Oct 27 13:49:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 306927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26859C4363A for ; Tue, 27 Oct 2020 18:14:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA986207E8 for ; Tue, 27 Oct 2020 18:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603822468; bh=uccbjVnIjVgigrqIjbS79OPTjDa+TLQTDs3MNrwqrh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=V31pHjb14DULFlg0vCOAYecwfw71xuoXac4SLagI/UAx0+5a1rAhwBOI1PafpWWNn mow0YqogSKbRh8RxpUT4B27AIgPpIPURLmXXukra2Az6bz/I/6GKJMFgRwl2VDuG+q ly0lemTrus+co1adOQsrJQoaVTuk2p2Rnrct5gGI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2901042AbgJ0SO2 (ORCPT ); Tue, 27 Oct 2020 14:14:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:34682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2507085AbgJ0ONU (ORCPT ); Tue, 27 Oct 2020 10:13:20 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F7EF2076A; Tue, 27 Oct 2020 14:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808000; bh=uccbjVnIjVgigrqIjbS79OPTjDa+TLQTDs3MNrwqrh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y1Nz1281jASlx8BEPLncQZmjPl+GGAaiVc99ykdoiOR+lrrYTa6E/1gEX7egUjAXw pYOiXYeB3zSNMtTNFNnPJY42olpCtg/Uy9q6BwL1sWSGg6SjqOD3tmzxO+ipWeCswM Z0py3bzqHVqVEB4elPGyVZQ5k2IMCyta3jfUWPLM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.14 120/191] Input: stmfts - fix a & vs && typo Date: Tue, 27 Oct 2020 14:49:35 +0100 Message-Id: <20201027134915.470663205@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: YueHaibing [ 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 Link: https://lore.kernel.org/r/20200916141941.16684-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- 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 c72662c979e79..d9e93dabbca21 100644 --- a/drivers/input/touchscreen/stmfts.c +++ b/drivers/input/touchscreen/stmfts.c @@ -484,7 +484,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)