Skip to content

Commit 3ad66d6

Browse files
Colin Ian Kinggregkh
authored andcommitted
parport: remove non-zero check on count
[ Upstream commit 0be883a ] 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 <sudipm.mukherjee@gmail.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Logically dead code") Link: https://lore.kernel.org/r/20210730100710.27405-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1e93025 commit 3ad66d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/parport/ieee1284_ops.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
518518
goto out;
519519

520520
/* Yield the port for a while. */
521-
if (count && dev->port->irq != PARPORT_IRQ_NONE) {
521+
if (dev->port->irq != PARPORT_IRQ_NONE) {
522522
parport_release (dev);
523523
schedule_timeout_interruptible(msecs_to_jiffies(40));
524524
parport_claim_or_block (dev);

0 commit comments

Comments
 (0)