提交 0be883a0 编写于 作者: C Colin Ian King 提交者: Greg Kroah-Hartman

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: NSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Logically dead code")
Link: https://lore.kernel.org/r/20210730100710.27405-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8c61951b
...@@ -518,7 +518,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port, ...@@ -518,7 +518,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
goto out; goto out;
/* Yield the port for a while. */ /* Yield the port for a while. */
if (count && dev->port->irq != PARPORT_IRQ_NONE) { if (dev->port->irq != PARPORT_IRQ_NONE) {
parport_release (dev); parport_release (dev);
schedule_timeout_interruptible(msecs_to_jiffies(40)); schedule_timeout_interruptible(msecs_to_jiffies(40));
parport_claim_or_block (dev); parport_claim_or_block (dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册