mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Felipe Balbi <balbi@ti.com>, Greg Kroah-Hartman <gregkh@suse.de>,
	Jiri Kosina <trivial@kernel.org>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 1/3] usb: musb: fix pm_runtime mismatches
Date: Fri, 16 Dec 2011 01:05:08 +0200	[thread overview]
Message-ID: <1323990310-11905-2-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1323990310-11905-1-git-send-email-felipe.contreras@gmail.com>

Properly call pm_runtime_put() afer pm_runttime_get() on errors.

Untested.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 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..95bfd2d 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(musb->controller);
 err0:
 	return retval;
 }
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index ba85f27..4edfb91 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -385,6 +385,7 @@ static void omap2430_musb_disable(struct musb *musb)
 
 static int omap2430_musb_exit(struct musb *musb)
 {
+	pm_runtime_put(musb->controller);
 	del_timer_sync(&musb_idle_timer);
 
 	omap2430_low_level_exit(musb);
-- 
1.7.8.rc1.14.g248db


  reply	other threads:[~2011-12-15 23:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 23:05 [PATCH 0/3] musb fixes and cleanups Felipe Contreras
2011-12-15 23:05 ` Felipe Contreras [this message]
2011-12-15 23:22   ` [PATCH 1/3] usb: musb: fix pm_runtime mismatches Alan Stern
2011-12-16  0:59     ` Felipe Contreras
2011-12-16  3:30       ` Alan Stern
2011-12-19 20:21         ` Felipe Contreras
2011-12-19  8:11   ` Felipe Balbi
2011-12-19 20:20     ` Felipe Contreras
2011-12-20 11:19       ` Felipe Balbi
2011-12-20 19:43         ` Felipe Contreras
2011-12-15 23:05 ` [PATCH 2/3] usb: musb: trivial cleanup Felipe Contreras
2011-12-15 23:05 ` [PATCH 3/3] usb: musb: remove a bit of indentation Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323990310-11905-2-git-send-email-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=balbi@ti.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®