summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuofei Ma <ruofeim@google.com>2022-01-22 00:27:25 +0000
committerRuofei Ma <ruofeim@google.com>2022-01-22 00:50:59 +0000
commit21acc5540fac61831d31328ea92765a67b32cbce (patch)
treecf1a7c8c8fa6cf036091927715aa6a64c1e66084
parent8a24c40e6fc2749684347858d6c02d902b0f05de (diff)
downloadgchips-21acc5540fac61831d31328ea92765a67b32cbce.tar.gz
Fix error recovery path for pt_client_register() failures
Unregister iommu fault handler if pt_client_register() returns -EPROBE_DEFER. Bug: 210150963 Change-Id: I5556f86538532fc251a2d6077775a0f9f5f779f0
-rw-r--r--bigo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bigo.c b/bigo.c
index a99c297..f8295a8 100644
--- a/bigo.c
+++ b/bigo.c
@@ -630,7 +630,7 @@ static int bigo_probe(struct platform_device *pdev)
rc = bigo_pt_client_register(pdev->dev.of_node, core);
if (rc == -EPROBE_DEFER) {
pr_warn("pt_client returns -EPROBE_DEFER, try again later\n");
- goto err_fault_handler;
+ goto err_pt_client;
} else {
rc = 0;
}
@@ -642,6 +642,8 @@ static int bigo_probe(struct platform_device *pdev)
return rc;
+err_pt_client:
+ iommu_unregister_device_fault_handler(&pdev->dev);
err_fault_handler:
pm_runtime_disable(&pdev->dev);
err_io: