Convert the request_irq to devm_request_irq. Also fixes the case where the in the function musb_init_controller free_irq(called from musb_free) is called before it is allocated. Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx> --- drivers/usb/musb/musb_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index dd24f96..b5cf52a 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1834,7 +1834,6 @@ static void musb_free(struct musb *musb) if (musb->nIrq >= 0) { if (musb->irq_wake) disable_irq_wake(musb->nIrq); - free_irq(musb->nIrq, musb); } if (is_dma_capable() && musb->dma_controller) { struct dma_controller *c = musb->dma_controller; @@ -1947,7 +1946,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) INIT_WORK(&musb->irq_work, musb_irq_work); /* attach to the IRQ */ - if (request_irq(nIrq, musb->isr, 0, dev_name(dev), musb)) { + if (devm_request_irq(musb->controller, nIrq, musb->isr, 0, + dev_name(dev), musb)) { dev_err(dev, "request_irq %d failed!\n", nIrq); status = -ENODEV; goto fail3; -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html