mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
usb: dwc3: xilinx: add missing depopulate in probe error path
Depopulate device in probe error paths to fix leak of children
resources.
Fixes: 53b5ff83d8 ("usb: dwc3: xilinx: improve error handling for PM APIs")
Cc: stable@vger.kernel.org
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20240816075409.23080-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2aa765a438
commit
16f2a21d9d
|
|
@ -327,9 +327,14 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
|
|||
goto err_pm_set_suspended;
|
||||
|
||||
pm_suspend_ignore_children(dev, false);
|
||||
return pm_runtime_resume_and_get(dev);
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0)
|
||||
goto err_pm_set_suspended;
|
||||
|
||||
return 0;
|
||||
|
||||
err_pm_set_suspended:
|
||||
of_platform_depopulate(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
|
||||
err_clk_put:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user