Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp509655pxb; Thu, 9 Sep 2021 06:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC8ekqKhR44Och39DeMbi24Ppt3Yy6et0dluwTVKOzeyonxyyHcCWbo6EhdX46IHjLTQqN X-Received: by 2002:a92:c5c2:: with SMTP id s2mr2322378ilt.278.1631192915497; Thu, 09 Sep 2021 06:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631192915; cv=none; d=google.com; s=arc-20160816; b=fievAd+OdSkxlNhdx5fzXrC80GE+np7LCUC07U/lWZJbTWwSlU9oc+L/akIDKYkiRY BsyRDxss2aUwiqnvFXnR6wXoT/j4WCN6jc7hwFBLGRMhJmI06eYZomTOJePh/rqMETgV qNjm20AJ/4PefQi4c/7/hucttmzKP/lVr9wPicEIwj42Oi9Bgy1Vsj7fuO+rUeKRtSLD J0syf7qvmgjWNxGG8o709m8qpQGNjxUD2Q/oUnMkjbwBfrzcfPF5I3SQBTn1cf3hcWAl B6X+MFjjJNPDvXisI28X31I55Hn+B15jyWaQvIEvuRjgRA3oUKYNgz6PUCNuv7RD5e97 c5LQ== 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=bMDJqEXL579gzM/M965prHOcmhZ7VwxvsMkPtMo7jV8C2Y1C6fCiJ6UOFapdohWdB1 ehK0HFlZ83rwwYzcw0KxWiv9NzYp1f01XfHRVTfDg0hs/ozhDhLOXQBbPAbhNR17kDzv IpE0Cc0PsJcWPOYB3qePzgeSo1/JYgtl8L9Y44B7xAEc72fcjTc2hIMneh8NzaLJ8PK9 HrKysZRYzEVAPcM9TNWTjvFAqwn2bLrHnxOyuYUrUzwmyt5bf9hqSqaLx9btSxuMtCSU 4XzIhQYTCK81/7pS3o4Va7SP+1JwR/kaXQlwceHNlyExhbCm2P2EKnWJxgDvDkl4Gmxy WxgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YAK9UOYR; 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 i6si1825587ilq.174.2021.09.09.06.07.56; Thu, 09 Sep 2021 06:08:35 -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=YAK9UOYR; 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 S1357746AbhIINEm (ORCPT + 99 others); Thu, 9 Sep 2021 09:04:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:42404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350490AbhIIMvd (ORCPT ); Thu, 9 Sep 2021 08:51:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E8A263227; Thu, 9 Sep 2021 11:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631188639; bh=QRAfYCMlD1tydVAsQqC38dv/IQY/ZID3c6hiYrYC74A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YAK9UOYRuvpbSwc8GpWrFL6wUaCbIvS49SOibPiyoTW4GGTG+Zmjt0jubw+ylTWxR QMSrmhPUcDwZSCsQxCPnPdG006fPKWjZCj0gZIit5YYTN70N3e51KAJ4XwEinldVYD YTuvyVxS9vIhhUsv2NpVUehzW0xMe9gRiwDf2zddSByV3wa9bhgAoEGRGyX3u/yJNz Y7yuns8B0iQh/5xCrem8u5pMSGIninCi6vf9V/KaQgT7j6veDc4fHVUZvR9xbpgwkh FpQVbgayyWL24RxkGK2lLRzf24cUr1uuQTfT9LidnQcpHj1HNc89jTl/qLmb1pW57M WQW+ze/JheiTQ== 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.4 104/109] parport: remove non-zero check on count Date: Thu, 9 Sep 2021 07:55:01 -0400 Message-Id: <20210909115507.147917-104-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909115507.147917-1-sashal@kernel.org> References: <20210909115507.147917-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