提交 affc9a0d 编写于 作者: B Ben Hutchings 提交者: Mauro Carvalho Chehab

[media] staging: lirc_serial: Do not assume error codes returned by request_irq()

lirc_serial_probe() must fail if request_irq() returns an error, even if
it isn't EBUSY or EINVAL,
Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 9b98d606
......@@ -843,18 +843,15 @@ static int __devinit lirc_serial_probe(struct platform_device *dev)
result = request_irq(irq, irq_handler,
(share_irq ? IRQF_SHARED : 0),
LIRC_DRIVER_NAME, (void *)&hardware);
switch (result) {
case -EBUSY:
printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n", irq);
return -EBUSY;
case -EINVAL:
printk(KERN_ERR LIRC_DRIVER_NAME
": Bad irq number or handler\n");
return -EINVAL;
default:
break;
};
if (result < 0) {
if (result == -EBUSY)
printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n",
irq);
else if (result == -EINVAL)
printk(KERN_ERR LIRC_DRIVER_NAME
": Bad irq number or handler\n");
return result;
}
/* Reserve io region. */
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册