USB: musb free_irq bugfix

Fixes insert module failure as free_irq() was not
done in previous rmmod.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Ajay Kumar Gupta 2009-01-24 17:56:39 -08:00 committed by Greg Kroah-Hartman
parent 37daa925cf
commit 97a3989681
1 changed files with 3 additions and 2 deletions

View File

@ -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) {