提交 9ffeca3e 编写于 作者: S Sudip Mukherjee 提交者: 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: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 797150b9
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册