Commit 9ab27eb5 authored by Jan Kiszka's avatar Jan Kiszka Committed by Mathieu Poirier

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: 61f6f684 ("remoteproc: k3-r5: Wait for core0 power-up before powering up core1")
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Acked-by: default avatarBeleswar Padhi <b-padhi@ti.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/9f481156-f220-4adf-b3d9-670871351e26@siemens.comSigned-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent ff555fc5
......@@ -1313,7 +1313,7 @@ static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
dev_err(dev,
"Timed out waiting for %s core to power up!\n",
rproc->name);
return ret;
goto err_powerup;
}
}
......@@ -1329,6 +1329,7 @@ static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
}
}
err_powerup:
rproc_del(rproc);
err_add:
k3_r5_reserved_mem_exit(kproc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment