Commit 9ffeca3e authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Martin K. Petersen

imm: check parport_claim

parport_claim() can fail and we should be checking if we were able to
claim the port.
Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 797150b9
......@@ -77,10 +77,11 @@ static void imm_wakeup(void *ref)
spin_lock_irqsave(&arbitration_lock, flags);
if (dev->wanted) {
parport_claim(dev->dev);
if (parport_claim(dev->dev) == 0) {
got_it(dev);
dev->wanted = 0;
}
}
spin_unlock_irqrestore(&arbitration_lock, flags);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment