Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1539987pxb; Thu, 16 Sep 2021 09:31:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6vGP696KxdqnbOCC+zHU6ghpZoDDWzSmkOd5ggsN2VUkU5MkZ+TRIspmv7kGX9oLQrD4A X-Received: by 2002:a6b:8e50:: with SMTP id q77mr4989503iod.96.1631809878025; Thu, 16 Sep 2021 09:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809878; cv=none; d=google.com; s=arc-20160816; b=Iv5txY4Z/m8HKLCh93CTtntyA5UHS3QMdn7pWOi3KCai7icwm/pRtNA9fz/9xyhZkQ Y3fm6+2b3j5CtR11uE4GzFZQBWI6IFbkk065SyaFeKofRTfdtUhqLI/51st+vqQQtcA7 FwJ/+wDDhhOgbyJugvN+y2DspsFxQHh1hJRg/8U1K6i99wHk52N4yZculv+l98eKFuel e2nkZzyjaKlqsupXYLTRLKeeAJi0AFFBokoMLfM/ufHGMNPJSYO1Qrs+ne1KxYXRmKKd Je5w1EBErNKq8i45cPglV4MP3vmJokjBBDukOE+wbkOYHjibA3R/0aOD8d2GtT9HI+O5 Zzeg== 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=YgeYYds9Gb6vVyQG0P/zkk+25MxmRMhdA0CJ3KbjA5g=; b=e3keHHMSjcmDsHTprjRphE8HrwqC74xO6y88f3hC5VQB6TZBF1aLjrVVvmqGZj1OKk F3FUKgRmGVA2dLwFDH/rkFL6Js2WicvVcVS3iZ2wUycDL/p+S6sqWpmCmHNfpNGOPdtH W49aHxpPi02WE844G3TQcnrtKDWYa2S8smY5pjCLEl8NYLCHaGykeAB593ygp/PMJx8d Ck8F71++7i5bkTGXzhkMAkEyMorvcQG5Yhovfq6Ido+uRJ/u5pDBrDXs3TJVdMroOaoy 8haOcCg8eNUkgYH+0lAStOmDkP63LFNBKSysT4w2O3UUOQihnDEDSTHUvW3uFW2Db6+p 68SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yom4g18U; 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 y28si3102526iot.48.2021.09.16.09.31.05; Thu, 16 Sep 2021 09:31:18 -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=yom4g18U; 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 S241599AbhIPQaw (ORCPT + 99 others); Thu, 16 Sep 2021 12:30:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:59354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236839AbhIPQV6 (ORCPT ); Thu, 16 Sep 2021 12:21:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 44C38613A8; Thu, 16 Sep 2021 16:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808915; bh=6GYGAVk2gYlgVH3/XQYaDlJTce6H+5zqR3EON9Hy2B4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yom4g18U5U5EPoVypOqLalF9rv1ftqB61H2MZbKW69BJ5FGzl7a1lSZ/B9H8UeWBl pCQJCpCEikeoOy89FqgkW6G2bUQF9CoBY/3diEi9U36ZrpJhzhl+sZdWmeRUE77k1y atVGsSwYrZc6ETfek7npBC0bMDX/5fEVbqZuw9GM= 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 5.10 269/306] parport: remove non-zero check on count Date: Thu, 16 Sep 2021 18:00:14 +0200 Message-Id: <20210916155803.242399027@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 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