From: Shuah Khan <shuahkh@osg.samsung.com> To: balbi@kernel.org, gregkh@linuxfoundation.org, kgene@kernel.org, krzk@kernel.org, javier@osg.samsung.com Cc: Shuah Khan <shuahkh@osg.samsung.com>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 2/7] usb: dwc3: dwc3-omap: fix dwc3_omap_probe() do put_sync when get_sync works Date: Fri, 24 Mar 2017 18:05:00 -0600 [thread overview] Message-ID: <a7d3539cdb21ef9694869f97a357ce40ace0ddd3.1490387086.git.shuahkh@osg.samsung.com> (raw) In-Reply-To: <cover.1490387086.git.shuahkh@osg.samsung.com> In-Reply-To: <cover.1490387086.git.shuahkh@osg.samsung.com> dwc3_omap_probe() does pm_runtime_put_sync() in its err1 handling when pm_runtime_get_sync() fails. Fix it to do put_sync only when get_sync succeeds. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- drivers/usb/dwc3/dwc3-omap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 2092e46..55b12a9 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -518,25 +518,26 @@ static int dwc3_omap_probe(struct platform_device *pdev) if (ret) { dev_err(dev, "failed to request IRQ #%d --> %d\n", omap->irq, ret); - goto err1; + goto put_sync; } ret = dwc3_omap_extcon_register(omap); if (ret < 0) - goto err1; + goto put_sync; ret = of_platform_populate(node, NULL, NULL, dev); if (ret) { dev_err(&pdev->dev, "failed to create dwc3 core\n"); - goto err1; + goto put_sync; } dwc3_omap_enable_irqs(omap); enable_irq(omap->irq); return 0; -err1: +put_sync: pm_runtime_put_sync(dev); +err1: pm_runtime_disable(dev); return ret; -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: shuahkh@osg.samsung.com (Shuah Khan) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] usb: dwc3: dwc3-omap: fix dwc3_omap_probe() do put_sync when get_sync works Date: Fri, 24 Mar 2017 18:05:00 -0600 [thread overview] Message-ID: <a7d3539cdb21ef9694869f97a357ce40ace0ddd3.1490387086.git.shuahkh@osg.samsung.com> (raw) In-Reply-To: <cover.1490387086.git.shuahkh@osg.samsung.com> dwc3_omap_probe() does pm_runtime_put_sync() in its err1 handling when pm_runtime_get_sync() fails. Fix it to do put_sync only when get_sync succeeds. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- drivers/usb/dwc3/dwc3-omap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 2092e46..55b12a9 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -518,25 +518,26 @@ static int dwc3_omap_probe(struct platform_device *pdev) if (ret) { dev_err(dev, "failed to request IRQ #%d --> %d\n", omap->irq, ret); - goto err1; + goto put_sync; } ret = dwc3_omap_extcon_register(omap); if (ret < 0) - goto err1; + goto put_sync; ret = of_platform_populate(node, NULL, NULL, dev); if (ret) { dev_err(&pdev->dev, "failed to create dwc3 core\n"); - goto err1; + goto put_sync; } dwc3_omap_enable_irqs(omap); enable_irq(omap->irq); return 0; -err1: +put_sync: pm_runtime_put_sync(dev); +err1: pm_runtime_disable(dev); return ret; -- 2.7.4
next prev parent reply other threads:[~2017-03-25 0:05 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-25 0:04 [PATCH 0/7] dwc3 - bug fixes and use meaningful goto labels Shuah Khan 2017-03-25 0:04 ` Shuah Khan 2017-03-25 0:04 ` [PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails Shuah Khan 2017-03-25 0:04 ` Shuah Khan 2017-03-25 7:52 ` Felipe Balbi 2017-03-25 7:52 ` Felipe Balbi 2017-03-25 7:52 ` Felipe Balbi 2017-03-25 0:05 ` Shuah Khan [this message] 2017-03-25 0:05 ` [PATCH 2/7] usb: dwc3: dwc3-omap: fix dwc3_omap_probe() do put_sync when get_sync works Shuah Khan 2017-03-25 7:53 ` Felipe Balbi 2017-03-25 7:53 ` Felipe Balbi 2017-03-25 7:53 ` Felipe Balbi 2017-03-25 0:05 ` [PATCH 3/7] usb: dwc3: core: change goto labels to meaningful names Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` [PATCH 4/7] usb: dwc3: exynos: change goto labels in this file " Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` [PATCH 5/7] usb: dwc3: omap: " Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` [PATCH 6/7] usb: dwc3: gadget: " Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` [PATCH 7/7] usb: dwc3: host: " Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 0:05 ` Shuah Khan 2017-03-25 7:51 ` [PATCH 0/7] dwc3 - bug fixes and use meaningful goto labels Felipe Balbi 2017-03-25 7:51 ` Felipe Balbi 2017-03-25 7:51 ` Felipe Balbi 2017-03-27 13:44 ` Shuah Khan 2017-03-27 13:44 ` Shuah Khan 2017-03-27 13:44 ` Shuah Khan
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=a7d3539cdb21ef9694869f97a357ce40ace0ddd3.1490387086.git.shuahkh@osg.samsung.com \ --to=shuahkh@osg.samsung.com \ --cc=balbi@kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=javier@osg.samsung.com \ --cc=kgene@kernel.org \ --cc=krzk@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux-usb@vger.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.