linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] remoteproc: st: Fix error return code in st_rproc_probe()
@ 2016-10-17 16:23 Wei Yongjun
  2016-11-01  0:37 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-10-17 16:23 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH -next] remoteproc: st: Fix error return code in st_rproc_probe()
  2016-10-17 16:23 [PATCH -next] remoteproc: st: Fix error return code in st_rproc_probe() Wei Yongjun
@ 2016-11-01  0:37 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2016-11-01  0:37 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-01  0:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 16:23 [PATCH -next] remoteproc: st: Fix error return code in st_rproc_probe() Wei Yongjun
2016-11-01  0:37 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).