From mboxrd@z Thu Jan 1 00:00:00 1970 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=unavailable 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 8C8BAC388F9 for ; Tue, 27 Oct 2020 16:40:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B79A21707 for ; Tue, 27 Oct 2020 16:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603816802; bh=7KqA2J9W8RGKJt94qEu1gpm998jLuhzpZ7QPmerkb9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=yytrlgvXAuOQf5b+2HBLi871oCsONAGdyJvG1HuxCcqbPgZ4wKJBm76ou2aOet48m I8HU5nXEHpb5W4VIZpxDe2Et8Pm8vph042gAYHVmEiWBc9WLTgmya7sOSzUADLY+il pD4YUmzGQg62DLBk000OoN4yub4XtrYZkZfxhhco= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1795460AbgJ0QkA (ORCPT ); Tue, 27 Oct 2020 12:40:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:40468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1801888AbgJ0Po6 (ORCPT ); Tue, 27 Oct 2020 11:44:58 -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 BB82921D42; Tue, 27 Oct 2020 15:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813476; bh=7KqA2J9W8RGKJt94qEu1gpm998jLuhzpZ7QPmerkb9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J0sjhDB7idpJCaGYBgkSZ4w8hol1MPcNE1ZrCiPEa4RZAgYpulooJekz/ixDEYaLn kq1hlDClVtB97RrWzPsuAx9c8eJV7CPItm/83tLH6Bwx1YV42o2hP/mo58Hz9VHr5F PRCOUhMnWznWo6VOc8oejDAbHJ4LUncWAkcwYtOI= 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 5.9 564/757] Input: stmfts - fix a & vs && typo Date: Tue, 27 Oct 2020 14:53:34 +0100 Message-Id: <20201027135516.956855734@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 df946869d4cd1..9a64e1dbc04ad 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.25.1