Commit 97a39896 authored by Ajay Kumar Gupta's avatar Ajay Kumar Gupta Committed by Greg Kroah-Hartman

USB: musb free_irq bugfix

Fixes insert module failure as free_irq() was not
done in previous rmmod.
Signed-off-by: default avatarAjay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 37daa925
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment