Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1375734 > unrolled thread

[PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe()

Started byRoger Quadros <rogerq@ti.com>
First post2016-04-11 13:40 +0200
Last post2016-04-11 15:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe() Roger Quadros <rogerq@ti.com> - 2016-04-11 13:40 +0200
    Re: [PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe() Felipe Balbi <balbi@kernel.org> - 2016-04-11 14:30 +0200
      Re: [PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe() Roger Quadros <rogerq@ti.com> - 2016-04-11 15:20 +0200

#1375734 — [PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe()

FromRoger Quadros <rogerq@ti.com>
Date2016-04-11 13:40 +0200
Subject[PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe()
Message-ID<rmImf-57L-25@gated-at.bofh.it>
From: Felipe Balbi <balbi@kernel.org>

Even if pm_runtime_get*() fails, we *MUST* call
pm_runtime_put_sync() before disabling PM.

While at it, remove superfluous dwc3_omap_disable_irqs()
in error path.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
[nsekhar@ti.com: patch description updates]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/dwc3/dwc3-omap.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index c9b918d..3497b25 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -499,7 +499,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;
 	}
 
 	dwc3_omap_map_offset(omap);
@@ -519,28 +519,24 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 
 	ret = dwc3_omap_extcon_register(omap);
 	if (ret < 0)
-		goto err2;
+		goto err1;
 
 	ret = of_platform_populate(node, NULL, NULL, dev);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to create dwc3 core\n");
-		goto err3;
+		goto err2;
 	}
 
 	dwc3_omap_enable_irqs(omap);
 
 	return 0;
 
-err3:
+err2:
 	extcon_unregister_notifier(omap->edev, EXTCON_USB, &omap->vbus_nb);
 	extcon_unregister_notifier(omap->edev, EXTCON_USB_HOST, &omap->id_nb);
-err2:
-	dwc3_omap_disable_irqs(omap);
 
 err1:
 	pm_runtime_put_sync(dev);
-
-err0:
 	pm_runtime_disable(dev);
 
 	return ret;
-- 
2.5.0

[toc] | [next] | [standalone]


#1375775

FromFelipe Balbi <balbi@kernel.org>
Date2016-04-11 14:30 +0200
Message-ID<rmJ8C-5Ts-17@gated-at.bofh.it>
In reply to#1375734

[Multipart message — attachments visible in raw view] — view raw

Hi,

Roger Quadros <rogerq@ti.com> writes:
> From: Felipe Balbi <balbi@kernel.org>
>
> Even if pm_runtime_get*() fails, we *MUST* call
> pm_runtime_put_sync() before disabling PM.
>
> While at it, remove superfluous dwc3_omap_disable_irqs()
> in error path.
>
> Signed-off-by: Felipe Balbi <balbi@kernel.org>
> [nsekhar@ti.com: patch description updates]
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>

this fix is unrelated to DRD/OTG work, right ? Care to rebase only this
patch on v4.6-rc3 so I can apply it during current -rc ?

-- 
balbi

[toc] | [prev] | [next] | [standalone]


#1375834

FromRoger Quadros <rogerq@ti.com>
Date2016-04-11 15:20 +0200
Message-ID<rmJV0-6uN-19@gated-at.bofh.it>
In reply to#1375775
On 11/04/16 15:20, Felipe Balbi wrote:
> 
> Hi,
> 
> Roger Quadros <rogerq@ti.com> writes:
>> From: Felipe Balbi <balbi@kernel.org>
>>
>> Even if pm_runtime_get*() fails, we *MUST* call
>> pm_runtime_put_sync() before disabling PM.
>>
>> While at it, remove superfluous dwc3_omap_disable_irqs()
>> in error path.
>>
>> Signed-off-by: Felipe Balbi <balbi@kernel.org>
>> [nsekhar@ti.com: patch description updates]
>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
> 
> this fix is unrelated to DRD/OTG work, right ? Care to rebase only this
> patch on v4.6-rc3 so I can apply it during current -rc ?
> 
Sure, will do that.

cheers,
-roger

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web