Skip to content

Commit 0be883a

Browse files
Colin Ian Kinggregkh
authored andcommitted
parport: remove non-zero check on count
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 <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Addresses-Coverity: ("Logically dead code") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8c61951 commit 0be883a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)