diff mbox

[-next] remoteproc: st: Fix error return code in st_rproc_probe()

Message ID 1476721415-20224-1-git-send-email-weiyj.lk@gmail.com
State Accepted
Headers show

Commit Message

Wei Yongjun Oct. 17, 2016, 4:23 p.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

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

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/remoteproc/st_remoteproc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Bjorn Andersson Nov. 1, 2016, 12:37 a.m. UTC | #1
On Mon 17 Oct 09:23 PDT 2016, Wei Yongjun wrote:

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix to return a negative error code from the st_rproc_state() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied, with added "Fixes". Thanks!

Regards,
Bjorn

> ---
>  drivers/remoteproc/st_remoteproc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 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);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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