Skip to contentSkip to conversation

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

PATCH New Wei Yongjun 2 participants 2 messages Oct 17, 2016 – Nov 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: st: Fix error return code in st_rproc_probe()

From: Wei Yongjun <[email protected]>

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

---
 drivers/remoteproc/st_remoteproc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/remoteproc/st_remoteproc.c +3 -1
index ae8963f..da4e152 100644
@@ -245,8 +245,10 @@ static int st_rproc_probe(struct platform_device *pdev)
 		goto free_rproc;
 
 	enabled = st_rproc_state(pdev);
-	if (enabled < 0)
+	if (enabled < 0) {
+		ret = enabled;
 		goto free_rproc;
+	}
 
 	if (enabled) {
 		atomic_inc(&rproc->power);
#1 lore raw

PATCH 1/1 remoteproc: st: Fix error return code in st_rproc_probe()

Quoted 6 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

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

Applied, with added "Fixes". Thanks!

Regards,
Bjorn

Quoted 21 lines
---
 drivers/remoteproc/st_remoteproc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/remoteproc/st_remoteproc.c +3 -1
index ae8963f..da4e152 100644
@@ -245,8 +245,10 @@ static int st_rproc_probe(struct platform_device *pdev)
 		goto free_rproc;
 
 	enabled = st_rproc_state(pdev);
-	if (enabled < 0)
+	if (enabled < 0) {
+		ret = enabled;
 		goto free_rproc;
+	}
 
 	if (enabled) {
 		atomic_inc(&rproc->power);