Commit 3e49ecf6 authored by Loic Pallardy's avatar Loic Pallardy Committed by Bjorn Andersson

remoteproc: st: correct probe error management

Associated clock is prepared in st_rproc_parse_dt function.
it should be unprepared in case of error during probing.
Signed-off-by: default avatarLoic Pallardy <loic.pallardy@st.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 5e6533f7
......@@ -247,7 +247,7 @@ static int st_rproc_probe(struct platform_device *pdev)
enabled = st_rproc_state(pdev);
if (enabled < 0) {
ret = enabled;
goto free_rproc;
goto free_clk;
}
if (enabled) {
......@@ -259,10 +259,12 @@ static int st_rproc_probe(struct platform_device *pdev)
ret = rproc_add(rproc);
if (ret)
goto free_rproc;
goto free_clk;
return 0;
free_clk:
clk_unprepare(ddata->clk);
free_rproc:
rproc_free(rproc);
return ret;
......
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