From: Felipe Contreras <felipe.contreras@xxxxxxxxx> Properly call pm_runtime_put() afer pm_runttime_get() on errors. Comments from Alan Stern. Untested. Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> --- drivers/usb/musb/musb_gadget.c | 1 + drivers/usb/musb/omap2430.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 922148f..4d6a37a 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1960,6 +1960,7 @@ static int musb_gadget_start(struct usb_gadget *g, err2: if (!is_otg_enabled(musb)) musb_stop(musb); + pm_runtime_put_sync(musb->controller); err0: return retval; } diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index ba85f27..1a5d45e 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -389,6 +389,7 @@ static int omap2430_musb_exit(struct musb *musb) omap2430_low_level_exit(musb); otg_put_transceiver(musb->xceiv); + pm_runtime_put_sync(musb->controller); return 0; } -- 1.7.8 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html