diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-07-30 11:07:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-22 11:48:08 +0200 |
commit | d84d3b7ffbcd7ee6ee22c8aff51e5d9d751ec478 (patch) | |
tree | 3ffa5608e66c36093c808461e09353ec35b22bba /drivers | |
parent | 7b44a56ce5f3a1a6e4af993c2997e2f462d327e5 (diff) | |
download | linux-stable-d84d3b7ffbcd7ee6ee22c8aff51e5d9d751ec478.tar.gz linux-stable-d84d3b7ffbcd7ee6ee22c8aff51e5d9d751ec478.tar.bz2 linux-stable-d84d3b7ffbcd7ee6ee22c8aff51e5d9d751ec478.zip |
parport: remove non-zero check on count
[ 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 <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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parport/ieee1284_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index 5d41dda6da4e..75daa16f38b7 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c @@ -535,7 +535,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); |