Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2658747pxj; Mon, 31 May 2021 07:36:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylCMlATmU3X0uUws3ED0LlTKQNoJA+MK64W+vP57XNCXdE/eQfdrCWa+zhTOHLafk6FOgc X-Received: by 2002:a17:906:2ec6:: with SMTP id s6mr22847256eji.65.1622471769084; Mon, 31 May 2021 07:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471769; cv=none; d=google.com; s=arc-20160816; b=yAeAvRkEUa9cFatL+qtaQIHBfKCkalZ1GpJE9NoLWXBuJmy6EAU8WbGspPNQJ39JKz r5Zw6nmGATOJWeKkT9evyidPq0OpTFr77UfTs918kt0In8vON9pQ13VoO4qXWsQuTm4a bJvO+XpuMQOIALqeHVvz3EqS5IF/plEb9DV4ohh1gbwclegmNMNjX77OLObmvOe+qSXy o0b/i4r/1hde5p1al2pgUFkM65fXGPMEqqy//y+d28TMyeKO08ZEFWnXdYx7Y45VTJZJ Mf0QQw8atVcR5O/jhbqYAXuWEgpB/3YiEIMZg4PVK3f3fd0rwP76cByi0foKOzzmKRBy dYLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tFaQIgCD+QtIcCAA0fOuBVTycRPuBkx8GzjceVPphK0=; b=j8HMadpQsvO7KU8mw7jApOzl3m0JDlvfyGdbHPytXvxMgYgH7kFlpsabqNfsGZA5Kd naRgrWxu5jdS7A85XW3ZxQCfCyqrj8mUFKSIy209YYUV3+mdRRLd4Au8p6JRrlvly6TS llHxSBlpb8/niRUzA86uAbrDIJFpel1FuV3kg1oXpWCTHvFacuHm7MbbczpfE3kAjoNx X8PvLkn5k7GzyPj7FYFVeiCU0G24XRgjbPNnAzBty32SULSE9YjXib46/uHRQ4GjrK6k /0i/sfNGJnz5rqbzLOW94J0u7iU2zfU5LHKKduVWRpP6+m4MzG6JdREDlcfQ+DS1WMmG nU9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ajk9vUco; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr12si12705999ejc.374.2021.05.31.07.35.46; Mon, 31 May 2021 07:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ajk9vUco; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232847AbhEaOdw (ORCPT + 99 others); Mon, 31 May 2021 10:33:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:59500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233285AbhEaNzG (ORCPT ); Mon, 31 May 2021 09:55:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A2E1B61437; Mon, 31 May 2021 13:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468043; bh=/RuQUyMIaJ9E9bQymBEYM3aoAaFljy1lzbmmttyFdb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ajk9vUco5eNXbEOvnQ3IKEj4XJ4TTnkNB7Ex1o6DOhzDe7G/UnG2WAzOxSz3lm5Jt grPeDNsC4PpOx5BsXuvEp9+AaBWqE21TYClO265GhS+2IiQ19fmDCUjHSUxA8C5TMC e92j5emcSub4JoWCAbxqBd58BajcQx1y03zFbxWw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King Subject: [PATCH 5.10 078/252] serial: tegra: Fix a mask operation that is always true Date: Mon, 31 May 2021 15:12:23 +0200 Message-Id: <20210531130700.642018293@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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: Colin Ian King commit 3ddb4ce1e6e3bd112778ab93bbd9092f23a878ec upstream. Currently the expression lsr | UART_LSR_TEMT is always true and this seems suspect. I believe the intent was to mask lsr with UART_LSR_TEMT to check that bit, so the expression should be using the & operator instead. Fix this. Fixes: b9c2470fb150 ("serial: tegra: flush the RX fifo on frame error") Signed-off-by: Colin Ian King Cc: stable Link: https://lore.kernel.org/r/20210426105514.23268-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/serial-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c @@ -333,7 +333,7 @@ static void tegra_uart_fifo_reset(struct do { lsr = tegra_uart_read(tup, UART_LSR); - if ((lsr | UART_LSR_TEMT) && !(lsr & UART_LSR_DR)) + if ((lsr & UART_LSR_TEMT) && !(lsr & UART_LSR_DR)) break; udelay(1); } while (--tmout);