Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319765pxb; Mon, 20 Sep 2021 18:43:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ387NBO+0e0qIlkLKQ6o0LIz8QG3jxv4qmjgyEtrQrj4xMbHwEvgvdcKkqBy7Pplu3gZZ X-Received: by 2002:a05:6402:27c7:: with SMTP id c7mr32939107ede.351.1632188589548; Mon, 20 Sep 2021 18:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188589; cv=none; d=google.com; s=arc-20160816; b=ZHfVKDOmLuXKDTX/Flb9pR6i7ls945XbrG+a+dZwuGDMfLgFE2Z42nfCI6mleegpWw XF+9sZmJu89Cde509++ZiycB0nMkA64uvoHKFUsAk39gUlppKpGJx+5/OQS97DkVsnZR oXXj7eFjeizKuqPavrkiid2E8t6zJnGCd3a769b5GM0cxyPod5dYmI6K3eDX2eaJVGd6 Ch+OxENYIhEnj+TbYfFJxFDd1S38MCC6K4/VKrgMJwbF0zhnH3qqw+p6Hda3SB//843V 3zJhoopNAI7ablXo4AkYQmmdQatbYkYTFY2Bc52i08TvdWTEGbnrsidVGuk4Fw4q72PM sb1w== 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=GlOX88dnuqe0/e2dTrXaZjDeE21J+ZqveqRkvrrUyAo=; b=zmSJwJoqS62y3GHUfyMq6Xfv/7jEzfQyrYFLt5PzMqoxcIJUJuCngqTHkZblhZr429 JqZ0Xptz4CfwnreCLni6YKxaHxqhr+wU3aWXgXKZ60Cb4dEJXMjAcS3CshSF/Meisfj4 UWN845f3FNX0UxKDlkYzujLzov2ksUmzog2O/s76qbLsL+ebQh6GGgBbF4DptWNSvAgU RXj+541YRkCuYVKYAqdJ5vgoZiB+wNG9WjWisBRQ95evCgMDUwy8B1Vfx6QGpM55l5RH zd3THMV7v4f06E/RXR3YRtinLN6mKRLWIujBycOVaCf5nGtDL4fKiXpscsxOfvGJxipI oNYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DzCqUeer; 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 ne41si6064880ejc.135.2021.09.20.18.42.46; Mon, 20 Sep 2021 18:43: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=DzCqUeer; 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 S1343547AbhITQyp (ORCPT + 99 others); Mon, 20 Sep 2021 12:54:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:39012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243457AbhITQut (ORCPT ); Mon, 20 Sep 2021 12:50:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2724461350; Mon, 20 Sep 2021 16:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156556; bh=Glq6Gzw1sbpK499PuOXT0KvtqLdtmo5/ThyFSrBMhE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DzCqUeerpsw0ClUhbHs94YAwMf7mT6lvc3HEqj0NKuXWHKY77na/rGrXREFq99HK2 8fzZOvDGUpw2EF+5JFLE+yRVMqvO+dagLbybcr0h8G2gYSNzw0BFKoBSgfuDi8vNOs z9bBsmDC4zReoKI30TNSQ+FTfGgyqh6CyTlTycG0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudip Mukherjee , Colin Ian King , Sasha Levin Subject: [PATCH 4.4 113/133] parport: remove non-zero check on count Date: Mon, 20 Sep 2021 18:43:11 +0200 Message-Id: <20210920163916.320175324@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 [ 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 2e21af43d91e..b6d808037045 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c @@ -534,7 +534,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