Эх сурвалжийг харах

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

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: 63edb0310a5c ("remoteproc: Supply controller driver for ST's Remote Processors")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Wei Yongjun 8 жил өмнө
parent
commit
1d701d3dd8

+ 3 - 1
drivers/remoteproc/st_remoteproc.c

@@ -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);