Skip to content

Commit 9ab27eb

Browse files
jan-kiszkamathieupoirier
authored andcommitted
remoteproc: k3-r5: Fix error handling when power-up failed
By simply bailing out, the driver was violating its rule and internal assumptions that either both or no rproc should be initialized. E.g., this could cause the first core to be available but not the second one, leading to crashes on its shutdown later on while trying to dereference that second instance. Fixes: 61f6f68 ("remoteproc: k3-r5: Wait for core0 power-up before powering up core1") Signed-off-by: Jan Kiszka <[email protected]> Acked-by: Beleswar Padhi <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent ff555fc commit 9ab27eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/remoteproc/ti_k3_r5_remoteproc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
13131313
dev_err(dev,
13141314
"Timed out waiting for %s core to power up!\n",
13151315
rproc->name);
1316-
return ret;
1316+
goto err_powerup;
13171317
}
13181318
}
13191319

@@ -1329,6 +1329,7 @@ static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
13291329
}
13301330
}
13311331

1332+
err_powerup:
13321333
rproc_del(rproc);
13331334
err_add:
13341335
k3_r5_reserved_mem_exit(kproc);

0 commit comments

Comments
 (0)