[Devel] Re: [PATCH 3/3] SPARC: Handle request_irq() failure
David Miller
davem at davemloft.net
Mon Feb 26 09:44:50 PST 2007
From: Monakhov Dmitriy <dmonakhov at openvz.org>
Date: Mon, 26 Feb 2007 19:09:27 +0300
> Signed-off-by: Monakhov Dmitriy <dmonakhov at openvz.org>
...
> @@ -389,7 +390,12 @@ static int __init ts102_uctrl_init(void)
> if(!driver->irq)
> driver->irq = tmp_irq[0].pri;
>
> - request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
> + err = request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
> + if (err) {
> + printk(KERN_ERR "%s: unable to request irq %d\n",
> + __FUNCTION__, driver->irq);
> + return -EBUSY;
> + }
>
Why not return the error code that request_irq() gave us?
That's how I'll fix this bug.
More information about the Devel
mailing list