usb: musb: core: fix failure path
authorMing Lei <ming.lei@canonical.com>
Fri, 4 Jan 2013 15:13:06 +0000 (23:13 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 17 Jan 2013 13:45:44 +0000 (15:45 +0200)
In the fail1~fail5 failure path, pm_runtime_disable() should
be called to avoid 'Unbalanced pm_runtime_enable' error in
next probe() which may be triggered by defer probe or next
'modprobe musb_hdrc'.

Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: <stable@vger.kernel.org> v3.8
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c

index f1c6c54..8219eb5 100644 (file)
@@ -1993,6 +1993,7 @@ fail2:
        musb_platform_exit(musb);
 
 fail1:
+       pm_runtime_disable(musb->controller);
        dev_err(musb->controller,
                "musb_init_controller failed with status %d\n", status);