diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-10-25 06:09:34 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-11-15 22:09:52 -0500 |
commit | bf55555baaf80cdf2cc4176fee02545a07a8ff4a (patch) | |
tree | e5dc2030d4a91a64dc64092909c468c8fde28079 | |
parent | 36fa4a530b7798aa85789953b08d94c03fb09fa5 (diff) |
dmaengine: sh: usb-dmac: Fix pm_runtime_{enable,disable}() imbalance
If the call to pm_runtime_get_sync() failed, Runtime PM was left
enabled.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/sh/usb-dmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c index f305738b5adf..f1bcc2a163b3 100644 --- a/drivers/dma/sh/usb-dmac.c +++ b/drivers/dma/sh/usb-dmac.c | |||
@@ -802,7 +802,7 @@ static int usb_dmac_probe(struct platform_device *pdev) | |||
802 | ret = pm_runtime_get_sync(&pdev->dev); | 802 | ret = pm_runtime_get_sync(&pdev->dev); |
803 | if (ret < 0) { | 803 | if (ret < 0) { |
804 | dev_err(&pdev->dev, "runtime PM get sync failed (%d)\n", ret); | 804 | dev_err(&pdev->dev, "runtime PM get sync failed (%d)\n", ret); |
805 | return ret; | 805 | goto error_pm; |
806 | } | 806 | } |
807 | 807 | ||
808 | ret = usb_dmac_init(dmac); | 808 | ret = usb_dmac_init(dmac); |
@@ -859,6 +859,7 @@ static int usb_dmac_probe(struct platform_device *pdev) | |||
859 | error: | 859 | error: |
860 | of_dma_controller_free(pdev->dev.of_node); | 860 | of_dma_controller_free(pdev->dev.of_node); |
861 | pm_runtime_put(&pdev->dev); | 861 | pm_runtime_put(&pdev->dev); |
862 | error_pm: | ||
862 | pm_runtime_disable(&pdev->dev); | 863 | pm_runtime_disable(&pdev->dev); |
863 | return ret; | 864 | return ret; |
864 | } | 865 | } |