Commit f607fd88 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

remoteproc: st: Fix error return code in st_rproc_probe()

commit 1d701d3d upstream.

Fix to return a negative error code from the st_rproc_state() error
handling case instead of 0, as done elsewhere in this function.

Fixes: 63edb031 ("remoteproc: Supply controller driver for ST's Remote Processors")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0e38a0b7
...@@ -245,8 +245,10 @@ static int st_rproc_probe(struct platform_device *pdev) ...@@ -245,8 +245,10 @@ static int st_rproc_probe(struct platform_device *pdev)
goto free_rproc; goto free_rproc;
enabled = st_rproc_state(pdev); enabled = st_rproc_state(pdev);
if (enabled < 0) if (enabled < 0) {
ret = enabled;
goto free_rproc; goto free_rproc;
}
if (enabled) { if (enabled) {
atomic_inc(&rproc->power); atomic_inc(&rproc->power);
......
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