From patchwork Thu Dec 12 21:38:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 3334421 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 60CA2C0D4A for ; Thu, 12 Dec 2013 21:39:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A04B8207BE for ; Thu, 12 Dec 2013 21:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC013207B0 for ; Thu, 12 Dec 2013 21:39:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751919Ab3LLVjt (ORCPT ); Thu, 12 Dec 2013 16:39:49 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:59450 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773Ab3LLVjo (ORCPT ); Thu, 12 Dec 2013 16:39:44 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id rBCLdHgr016542; Thu, 12 Dec 2013 15:39:17 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rBCLdH98025941; Thu, 12 Dec 2013 15:39:17 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Thu, 12 Dec 2013 15:39:16 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rBCLdHJE009866; Thu, 12 Dec 2013 15:39:17 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: , Linux ARM Kernel Mailing List , , Linux OMAP Mailing List , , Santosh Shilimkar , Felipe Balbi Subject: [PATCH 4/7] usb: dwc3: omap: fix pm_runtime usage Date: Thu, 12 Dec 2013 15:38:42 -0600 Message-ID: <1386884325-11440-5-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.8.4.GIT In-Reply-To: <1386884325-11440-1-git-send-email-balbi@ti.com> References: <1386884325-11440-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP even if pm_runtime_get*() fails, it still increments pm usage counter, so we must pm_runtime_put*() in that case too. Fix that observation in dwc3-omap.c. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index aea305d..076bb28 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -451,7 +451,7 @@ static int dwc3_omap_probe(struct platform_device *pdev) ret = pm_runtime_get_sync(dev); if (ret < 0) { dev_err(dev, "get_sync failed with err %d\n", ret); - goto err0; + goto err1; } reg = dwc3_omap_readl(omap->base, USBOTGSS_REVISION); @@ -566,8 +566,6 @@ err2: err1: pm_runtime_put_sync(dev); - -err0: pm_runtime_disable(dev); return ret;