Skip to content

Commit

Permalink
usb: dwc3: omap: add missing depopulate in probe error path
Browse files Browse the repository at this point in the history
commit 2aa765a upstream.

Depopulate device in probe error paths to fix leak of children
resources.

Fixes: ee249b4 ("usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq")
Cc: [email protected]
Acked-by: Thinh Nguyen <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Radhey Shyam Pandey <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
krzk authored and gregkh committed Sep 4, 2024
1 parent 50f98b6 commit 9c80a94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/dwc3/dwc3-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,13 @@ static int dwc3_omap_probe(struct platform_device *pdev)
if (ret) {
dev_err(dev, "failed to request IRQ #%d --> %d\n",
omap->irq, ret);
goto err1;
goto err2;
}
dwc3_omap_enable_irqs(omap);
return 0;

err2:
of_platform_depopulate(dev);
err1:
pm_runtime_put_sync(dev);
pm_runtime_disable(dev);
Expand Down

0 comments on commit 9c80a94

Please sign in to comment.