2020-08-31 22:59:30

by Mathieu Poirier

[permalink] [raw]
Subject: [PATCH] remoteproc: stm32: Fix pointer assignement

Fix the assignment of the @state pointer - it is obviously wrong.

Fixes: 376ffdc04456 ("remoteproc: stm32: Properly set co-processor state when attaching")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
---
drivers/remoteproc/stm32_rproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index f4da42fc0eeb..d2414cc1d90d 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -685,7 +685,7 @@ static int stm32_rproc_get_m4_status(struct stm32_rproc *ddata,
* We couldn't get the coprocessor's state, assume
* it is not running.
*/
- state = M4_STATE_OFF;
+ *state = M4_STATE_OFF;
return 0;
}

--
2.25.1


2020-09-01 07:26:16

by Arnaud POULIQUEN

[permalink] [raw]
Subject: Re: [PATCH] remoteproc: stm32: Fix pointer assignement

Hi Mathieu,

On 8/31/20 11:37 PM, Mathieu Poirier wrote:
> Fix the assignment of the @state pointer - it is obviously wrong.
>
> Fixes: 376ffdc04456 ("remoteproc: stm32: Properly set co-processor state when attaching")
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Mathieu Poirier <[email protected]>

Acked-by: Arnaud Pouliquen <[email protected]>

Thanks,
Arnaud
> ---
> drivers/remoteproc/stm32_rproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
> index f4da42fc0eeb..d2414cc1d90d 100644
> --- a/drivers/remoteproc/stm32_rproc.c
> +++ b/drivers/remoteproc/stm32_rproc.c
> @@ -685,7 +685,7 @@ static int stm32_rproc_get_m4_status(struct stm32_rproc *ddata,
> * We couldn't get the coprocessor's state, assume
> * it is not running.
> */
> - state = M4_STATE_OFF;
> + *state = M4_STATE_OFF;
> return 0;
> }
>
>