Commit bf55555b authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Vinod Koul

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 36fa4a53
......@@ -802,7 +802,7 @@ static int usb_dmac_probe(struct platform_device *pdev)
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "runtime PM get sync failed (%d)\n", ret);
return ret;
goto error_pm;
}
ret = usb_dmac_init(dmac);
......@@ -859,6 +859,7 @@ static int usb_dmac_probe(struct platform_device *pdev)
error:
of_dma_controller_free(pdev->dev.of_node);
pm_runtime_put(&pdev->dev);
error_pm:
pm_runtime_disable(&pdev->dev);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment