aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.15/950-0887-thermal-broadcom-Use-dev_err_probe-to-suppress-defer.patch
blob: 224a121077c353ae04880a5bdcfc0f8c608eb19a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From dd271e8b291cbb95608f7ed43077a8e4cc0c1a8a Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Fri, 6 May 2022 15:34:44 +0100
Subject: [PATCH] thermal: broadcom: Use dev_err_probe to suppress
 defer errors

It is quite common for the devm_thermal_zone_of_sensor_register
to need to defer, so avoid spamming the log by using
dev_err_probe instead of dev_err.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/thermal/broadcom/bcm2711_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/thermal/broadcom/bcm2711_thermal.c
+++ b/drivers/thermal/broadcom/bcm2711_thermal.c
@@ -92,7 +92,7 @@ static int bcm2711_thermal_probe(struct
 						       &bcm2711_thermal_of_ops);
 	if (IS_ERR(thermal)) {
 		ret = PTR_ERR(thermal);
-		dev_err(dev, "could not register sensor: %d\n", ret);
+		dev_err_probe(dev, ret, "could not register sensor: %d\n", ret);
 		return ret;
 	}