diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-10-17 16:23:35 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-19 19:18:06 (GMT) |
commit | f607fd883654003e76db567ebb4c4dd9054892bf (patch) | |
tree | a4ec61fd4de1cb9f3580efab4605f2d1f8f58a3d | |
parent | 0e38a0b7acbb8d046c7312ae8cb1e98951934226 (diff) | |
download | linux-f607fd883654003e76db567ebb4c4dd9054892bf.tar.xz |
remoteproc: st: Fix error return code in st_rproc_probe()
commit 1d701d3dd8caf6660ff33c3c23a115b4649c5cdb 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/remoteproc/st_remoteproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c index ae8963f..da4e152 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); |