Commit affc9a0d authored by Ben Hutchings's avatar Ben Hutchings Committed by 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: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9b98d606
...@@ -843,18 +843,15 @@ static int __devinit lirc_serial_probe(struct platform_device *dev) ...@@ -843,18 +843,15 @@ static int __devinit lirc_serial_probe(struct platform_device *dev)
result = request_irq(irq, irq_handler, result = request_irq(irq, irq_handler,
(share_irq ? IRQF_SHARED : 0), (share_irq ? IRQF_SHARED : 0),
LIRC_DRIVER_NAME, (void *)&hardware); LIRC_DRIVER_NAME, (void *)&hardware);
if (result < 0) {
switch (result) { if (result == -EBUSY)
case -EBUSY: printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n",
printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n", irq); irq);
return -EBUSY; else if (result == -EINVAL)
case -EINVAL: printk(KERN_ERR LIRC_DRIVER_NAME
printk(KERN_ERR LIRC_DRIVER_NAME ": Bad irq number or handler\n");
": Bad irq number or handler\n"); return result;
return -EINVAL; }
default:
break;
};
/* Reserve io region. */ /* Reserve io region. */
/* /*
......
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