Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp463072pxb; Thu, 9 Sep 2021 05:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6OGud+Xndv7Jh+KFjYjIxfzDds0v9Mf6LRr/HKvyoVj7ijpXHZFK7HwLG3ea2MPebrgGP X-Received: by 2002:a5d:9d01:: with SMTP id j1mr2441498ioj.27.1631189377271; Thu, 09 Sep 2021 05:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631189377; cv=none; d=google.com; s=arc-20160816; b=Bujlq8qyoL7vL57M1H7Av1KT+u4L7j/EsVvkdFm87cxcMUop9/GMfM1DrmCkq97TJ+ QBpDFXRfT3Gdq1779we84X0P04BBwgQF71z3hQw561G/7Dgl6Jz/I6OqyhF/pBbqj7mw Tudh3hHFS0u5bpfwNwADItu72CR4nVqp039DlyiIKZnH92vtwIy3NPk8tK3WBVOgxMwg YjDa2gOxqrbI4RP0pOTyxARF7U4BD8uTAC0LyGUNEjd5sGHBzTOki6Qd7J44ECWCzIZQ +BB9OHr00sIuKCHAtrcecfdpwokz+cVlku6UVFPSyEizbfWYzYDm7Hj47yXJ0j5vfxQ9 6nAg== 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=YgeYYds9Gb6vVyQG0P/zkk+25MxmRMhdA0CJ3KbjA5g=; b=sg2C/usAEj4HvdK2i/rqOYFORo/WfT1aNKjjzifo2pYp6/1LnIV5rzz+Klh83NpUdX M4xWQFCpDnVwW499kDs56rFMFbwczXnj5H5kHSabF4jZQPFTLhe89aO//Cq8Xpy1cV93 vkObSeiOSoHC4/lgyOIXH8u0LERZAvu4zBoBrWeqHXpotiW97493tuac5mgQI332l89a xQbVeEjmWr7OM1uf0D+5uea5kmm9pnNvnwb6FNVIKNVvw9Qd3Gfs4lWcy/VOI6ddWdqh zK9RQfzK4OtXdlKr+0XBda22xJaV2o6oIOpkU14A4jMfiRk9wi6ske6i+2LEvdRZrzdW Wecg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijGKmNYB; 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 z9si1813429ile.172.2021.09.09.05.09.24; Thu, 09 Sep 2021 05:09:37 -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=ijGKmNYB; 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 S242380AbhIIMIy (ORCPT + 99 others); Thu, 9 Sep 2021 08:08:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:40916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244632AbhIIMBF (ORCPT ); Thu, 9 Sep 2021 08:01:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 99A0F61528; Thu, 9 Sep 2021 11:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187983; bh=6GYGAVk2gYlgVH3/XQYaDlJTce6H+5zqR3EON9Hy2B4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ijGKmNYBY9gnayFJn8FaqtdS/EaX6BLk+gvvgfMeK6jx+9StTbEfrVtH1xjATg0/y UZCYmhLOkCNFNDPSBSjlSCDb/geVXY92DUMxa+SoIlnY7ZGWG29uiCd0tHPjqft+mc byVsCTuGg4PWR5duIqKQJ8NAFGO6g2D8uB4VMh2PUQTW2vOsiFMUnvvFtO4BYIjKTl LSuQiErKflRrNggd0P5YUS41Y3gWPsD6AbwPgUQv2QjHze4GusKRBYPhkC6QvIAdFt S53VztFSORmEaj6M7qVEFmFRZSmeUWId8vHhSpkC9EDakkGnzv5JbNe/fL8BrV6g0C ACM+oeqeQ21GQ== 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 5.14 244/252] parport: remove non-zero check on count Date: Thu, 9 Sep 2021 07:40:58 -0400 Message-Id: <20210909114106.141462-244-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-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 2c11bd3fe1fd..17061f1df0f4 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c @@ -518,7 +518,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