Hi Uwe,

On Thu, Nov 23, 2023 at 10:16:59PM +0100, Uwe Kleine-König wrote:
> When the remove callback returns non-zero, the driver core emits an
> error message about the error value being ignored. As the driver already
> emits an error message already, return zero. This has no effect apart
> from suppressing the core's message. The platform device gets unbound
> irrespective of the return value.
> 
> Signed-off-by: Uwe Kleine-König <[email protected]>
> ---
>  drivers/remoteproc/ti_k3_dsp_remoteproc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c 
> b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> index ef8415a7cd54..40a5fd8763fa 100644
> --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> @@ -835,8 +835,9 @@ static int k3_dsp_rproc_remove(struct platform_device 
> *pdev)
>       if (rproc->state == RPROC_ATTACHED) {
>               ret = rproc_detach(rproc);
>               if (ret) {
> +                     /* Note this error path leaks resources */

I'm not sure why this comment has been added...

>                       dev_err(dev, "failed to detach proc, ret = %d\n", ret);

And why this isn't refactored in the next patch.

> -                     return ret;
> +                     return 0;

Appart from the above I'm good with this patchset.

Thanks,
Mathieu

>               }
>       }
>  
> -- 
> 2.42.0
> 

Reply via email to