[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210730100710.27405-1-colin.king@canonical.com>
Date: Fri, 30 Jul 2021 11:07:10 +0100
From: Colin King <colin.king@...onical.com>
To: Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] parport: remove non-zero check on count
From: Colin Ian King <colin.king@...onical.com>
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.
Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
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.31.1
Powered by blists - more mailing lists