Re: [PATCH] b44: fix resume, request_irq after hw reset

From: David Miller
Date: Wed Oct 13 2010 - 12:46:41 EST


From: James Hogan <james@xxxxxxxxxxxxx>
Date: Tue, 12 Oct 2010 00:22:12 +0100

> @@ -2309,6 +2303,12 @@ static int b44_resume(struct ssb_device *sdev)
> netif_device_attach(bp->dev);
> spin_unlock_irq(&bp->lock);
>
> + rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev);
> + if (rc) {
> + netdev_err(dev, "request_irq failed\n");
> + return rc;
> + }
> +
> b44_enable_ints(bp);
> netif_wake_queue(dev);

Since you've moved the request_irq() down, you'll need to adjust
the error handling so that it undoes side effects made by this
function up until this point.

F.e. netif_device_attach() has to be undone for one thing.

Next, b44_init_rings() allocates memory that you must now free.

Etc. etc. etc.

This change is not so simple. :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/