Skip to content

Commit

Permalink
USB: musb free_irq bugfix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ajay Kumar Gupta authored and Greg Kroah-Hartman committed Jan 28, 2009
1 parent 37daa92 commit 97a3989
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 97a3989

Please sign in to comment.