In one of the error paths the free of nIrq was missed.
Fix the same.

Signed-off-by: Shubhrajyoti D <[email protected]>
---
 drivers/usb/musb/musb_core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index cf22953..d4504d5 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2034,7 +2034,7 @@ musb_init_controller(struct device *dev, int nIrq, void 
__iomem *ctrl)
 
        }
        if (status < 0)
-               goto fail3;
+               goto free_irq;
 
        status = musb_init_debugfs(musb);
        if (status < 0)
@@ -2066,12 +2066,12 @@ fail5:
        musb_exit_debugfs(musb);
 
 fail4:
-       free_irq(musb->nIrq, musb);
        if (!is_otg_enabled(musb) && is_host_enabled(musb))
                usb_remove_hcd(musb_to_hcd(musb));
        else
                musb_gadget_cleanup(musb);
-
+free_irq:
+       free_irq(musb->nIrq, musb);
 fail3:
        pm_runtime_put_sync(musb->controller);
 
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to