summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/st_remoteproc.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-17 18:23:35 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-11-01 01:36:10 +0100
commit1d701d3dd8caf6660ff33c3c23a115b4649c5cdb (patch)
tree90f2350643d10f03d57bb6876c09008324d3457f /drivers/remoteproc/st_remoteproc.c
parentremoteproc: debugfs: Remove state entry which is duplicated is sysfs (diff)
downloadlinux-1d701d3dd8caf6660ff33c3c23a115b4649c5cdb.tar.xz
linux-1d701d3dd8caf6660ff33c3c23a115b4649c5cdb.zip
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>
Diffstat (limited to 'drivers/remoteproc/st_remoteproc.c')
-rw-r--r--drivers/remoteproc/st_remoteproc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c
index ae8963fcc8c8..da4e152e9733 100644
--- a/drivers/remoteproc/st_remoteproc.c
+++ b/drivers/remoteproc/st_remoteproc.c
@@ -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);