diff mbox series

[043/117] media: venus: Warn only once about problems in .remove()

Message ID 20230326143224.572654-46-u.kleine-koenig@pengutronix.de (mailing list archive)
State Not Applicable
Headers show
Series media: Convert to platform remove callback returning void | expand

Commit Message

Uwe Kleine-König March 26, 2023, 2:31 p.m. UTC
The only effect of returning an error code in a remove callback is that
the driver core emits a warning. The device is unbound anyhow.

As the remove callback already emits a (quite verbose) warning when ret
is non-zero, return zero to suppress the additional warning.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/qcom/venus/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konrad Dybcio March 27, 2023, 8:45 a.m. UTC | #1
On 26.03.2023 16:31, Uwe Kleine-König wrote:
> The only effect of returning an error code in a remove callback is that
> the driver core emits a warning. The device is unbound anyhow.
> 
> As the remove callback already emits a (quite verbose) warning when ret
> is non-zero, return zero to suppress the additional warning.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/media/platform/qcom/venus/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 990a1519f968..403ffb92af60 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -448,7 +448,7 @@ static int venus_remove(struct platform_device *pdev)
>  	mutex_destroy(&core->lock);
>  	venus_dbgfs_deinit(core);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static void venus_core_shutdown(struct platform_device *pdev)
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 990a1519f968..403ffb92af60 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -448,7 +448,7 @@  static int venus_remove(struct platform_device *pdev)
 	mutex_destroy(&core->lock);
 	venus_dbgfs_deinit(core);
 
-	return ret;
+	return 0;
 }
 
 static void venus_core_shutdown(struct platform_device *pdev)