From: Ajay Kumar Gupta Date: Sun, 25 Jan 2009 01:56:39 +0000 (-0800) Subject: USB: musb free_irq bugfix X-Git-Tag: Ubuntu-5.0.0-8.9~29040^2~26 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=97a39896816489fe9a67c223e782e8dda06f25c9;p=mirror_ubuntu-disco-kernel.git USB: musb free_irq bugfix Fixes insert module failure as free_irq() was not done in previous rmmod. Signed-off-by: Ajay Kumar Gupta Acked-by: Felipe Balbi Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 6c7faacfb535..2cc34fa05b73 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1824,8 +1824,9 @@ static void musb_free(struct musb *musb) musb_gadget_cleanup(musb); #endif - if (musb->nIrq >= 0 && musb->irq_wake) { - disable_irq_wake(musb->nIrq); + 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) {