mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 13:40:53 +07:00
imm: check parport_claim
parport_claim() can fail and we should be checking if we were able to claim the port. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
797150b98a
commit
9ffeca3e57
@ -77,9 +77,10 @@ static void imm_wakeup(void *ref)
|
||||
|
||||
spin_lock_irqsave(&arbitration_lock, flags);
|
||||
if (dev->wanted) {
|
||||
parport_claim(dev->dev);
|
||||
got_it(dev);
|
||||
dev->wanted = 0;
|
||||
if (parport_claim(dev->dev) == 0) {
|
||||
got_it(dev);
|
||||
dev->wanted = 0;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&arbitration_lock, flags);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user