USB: dwc3: disable autosuspend on unbind

Add the missing calls to disable autosuspend on probe errors and on
driver unbind.

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230404072524.19014-4-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Johan Hovold 2023-04-04 09:25:16 +02:00 committed by Greg Kroah-Hartman
parent 44d257e901
commit 6b3b2402ca

View File

@ -1966,6 +1966,7 @@ static int dwc3_probe(struct platform_device *pdev)
err2:
pm_runtime_allow(dev);
pm_runtime_disable(dev);
pm_runtime_dont_use_autosuspend(dev);
pm_runtime_set_suspended(dev);
pm_runtime_put_noidle(dev);
disable_clks:
@ -1993,6 +1994,7 @@ static int dwc3_remove(struct platform_device *pdev)
pm_runtime_allow(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);