diff mbox series

[1/1] thermal/drivers/imx_sc_thermal: Use dev_err_probe

Message ID 20240717085517.3333385-1-alexander.stein@ew.tq-group.com
State Accepted
Commit 7d8abc5f3b5ce0f53d499279d8defc0f72bf7557
Headers show
Series [1/1] thermal/drivers/imx_sc_thermal: Use dev_err_probe | expand

Commit Message

Alexander Stein July 17, 2024, 8:55 a.m. UTC
This adds the error code to the error message and also stores that
message in case of probe deferral.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/thermal/imx_sc_thermal.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Alexander Stein Sept. 4, 2024, 11:48 a.m. UTC | #1
Hi,

Am Mittwoch, 17. Juli 2024, 10:55:16 CEST schrieb Alexander Stein:
> This adds the error code to the error message and also stores that
> message in case of probe deferral.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  drivers/thermal/imx_sc_thermal.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
> index 7224f8d21db97..88558ce588807 100644
> --- a/drivers/thermal/imx_sc_thermal.c
> +++ b/drivers/thermal/imx_sc_thermal.c
> @@ -111,8 +111,7 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
>  			if (ret == -ENODEV)
>  				continue;
>  
> -			dev_err(&pdev->dev, "failed to register thermal zone\n");
> -			return ret;
> +			return dev_err_probe(&pdev->dev, ret, "failed to register thermal zone\n");
>  		}
>  
>  		devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);
> 

Ping! Any feedback?

Thanks,
Alexander
Daniel Lezcano Sept. 4, 2024, 1:35 p.m. UTC | #2
On 17/07/2024 10:55, Alexander Stein wrote:
> This adds the error code to the error message and also stores that
> message in case of probe deferral.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index 7224f8d21db97..88558ce588807 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -111,8 +111,7 @@  static int imx_sc_thermal_probe(struct platform_device *pdev)
 			if (ret == -ENODEV)
 				continue;
 
-			dev_err(&pdev->dev, "failed to register thermal zone\n");
-			return ret;
+			return dev_err_probe(&pdev->dev, ret, "failed to register thermal zone\n");
 		}
 
 		devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);