Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp520975pxb; Thu, 9 Sep 2021 06:20:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMvqaMi7zFPEreBLwMSW2s7XJYXNPOuBK3RrLTboaIL2WA61ndN9kBHyoSHnKr0atPL/qa X-Received: by 2002:a92:c5c2:: with SMTP id s2mr2364967ilt.278.1631193655805; Thu, 09 Sep 2021 06:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631193655; cv=none; d=google.com; s=arc-20160816; b=rNX+rxGfxkfU+B7b710UA/sdWgoU5jCkTMsCFF5gY/I2vijnbDzP4oncv1Czp6rVgM yrjjPZqNM3h6PwpBKWdK1rEwUANyFUhLkiuM431vuE3YCNxhZgj5TPQ5cSS14ts9Wu41 QUOYmGqXyI2d9oxvs58r1lx0EgDw1txJNm3Dw3dpG5EtwEB6aBoKLGzVtoMUkPLbJgXf Ff3K3swDWxux5yArJO3yhB4RwWa+vp55dEhjc6ZZTqQjYHX8ZjyITwX6ombKEF466HvJ xmtRUTlRZ5GlkZEwuH72oK6ySD3a4u+BDbh8Mo66ZvEEYUUuBjvIRwnzx95SPv4r5V3Z gw0g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ffmCl7MeD4XN5tNtvIAK+hGc9FpDPOG1pQ8uUQ/9j0o=; b=PgFSVNAftJrTGMWgbo+qEiJTY8mTGmhWytZKTWL1j7zNXU3HjjvImiAFPgn3nwDy+q NB30GapU3Wbv0HbeZPRdNNHzBA5EvFFvB3ZbprJRwTxiYIFN43RX/Q09KV/h7EoOcGcB Rqj3DYJkHP21tgzbenOqi5970F5tw+IT2mntaY2YLDf8/mO+jm7NdJ84QW9BYNos9xZ/ oFI7sjBcx7Hu3+utEjpu0eXsbmS2R8m/6Wi7jirjHPZOFKgk0PmireJXGFEDEq38YoM8 EKfCKbPZ20/JyH/Qn1BXrSo1qNj6ixiOZ+elPVtLuiy9eTOMS1yQ3iLyJ+GVJhi/2SqU SSGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dzxm85nf; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si1918832ild.67.2021.09.09.06.20.44; Thu, 09 Sep 2021 06:20:55 -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=@kernel.org header.s=k20201202 header.b=dzxm85nf; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355520AbhIINRx (ORCPT + 99 others); Thu, 9 Sep 2021 09:17:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357888AbhIINFS (ORCPT ); Thu, 9 Sep 2021 09:05:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 331BF632A0; Thu, 9 Sep 2021 12:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631188809; bh=QRAfYCMlD1tydVAsQqC38dv/IQY/ZID3c6hiYrYC74A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dzxm85nfrUn0Aq6m78MFVtSp0WnUjtdncqM0cjeJdiLIcel2bYR4Y03b9tvXJSWFW t/hjZMSdX7EBVrsFC6s16kK4eWB/GtKo7WR5ZBci+vfFB8bjofv7NItIvzeReyQ08T VedNkcmztuLUuNEs/DOuWyf8uD+ubfJTxJ/beCoGYPzvMFKQpHCud/MtId1VILX8M8 2QDwmvW3pKU/QQYjI3yjcfxU113z98kxjPiNWnsEQF/Uh4FF+vOhyX7qJ2L8Pxejpr DYSblc8RyJuHzp6nE91THvPkpPTkLJE3ESIiQyaLmSWNcBjYx6ZUPjszjcVRYZMfO2 Evady1UXEGUmA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Colin Ian King , Sudip Mukherjee , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.14 55/59] parport: remove non-zero check on count Date: Thu, 9 Sep 2021 07:58:56 -0400 Message-Id: <20210909115900.149795-55-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909115900.149795-1-sashal@kernel.org> References: <20210909115900.149795-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King [ Upstream commit 0be883a0d795d9146f5325de582584147dd0dcdc ] The check for count appears to be incorrect since a non-zero count check occurs a couple of statements earlier. Currently the check is always false and the dev->port->irq != PARPORT_IRQ_NONE part of the check is never tested and the if statement is dead-code. Fix this by removing the check on count. Note that this code is pre-git history, so I can't find a sha for it. Acked-by: Sudip Mukherjee Signed-off-by: Colin Ian King Addresses-Coverity: ("Logically dead code") Link: https://lore.kernel.org/r/20210730100710.27405-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/parport/ieee1284_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index 5d41dda6da4e..75daa16f38b7 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c @@ -535,7 +535,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port, goto out; /* Yield the port for a while. */ - if (count && dev->port->irq != PARPORT_IRQ_NONE) { + if (dev->port->irq != PARPORT_IRQ_NONE) { parport_release (dev); schedule_timeout_interruptible(msecs_to_jiffies(40)); parport_claim_or_block (dev); -- 2.30.2