[PATCH 45/61] thermal: Prefer IS_ERR_OR_NULL over manual NULL check
From: Philipp Hahn
Date: Tue Mar 10 2026 - 09:07:27 EST
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Eduardo Valentin <edubezval@xxxxxxxxx>
To: Keerthy <j-keerthy@xxxxxx>
To: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
To: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
To: Zhang Rui <rui.zhang@xxxxxxxxx>
To: Lukasz Luba <lukasz.luba@xxxxxxx>
Cc: linux-pm@xxxxxxxxxxxxxxx
Cc: linux-omap@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Philipp Hahn <phahn-oss@xxxxxx>
---
drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 0cf0826b805a998abd0d4e2cfa6938de8a46c4f0..9218417e6d923ec370e032f5b91f9a839fd293f4 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -228,7 +228,7 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
return 0;
data = ti_bandgap_get_sensor_data(bgp, id);
- if (!data || IS_ERR(data))
+ if (IS_ERR_OR_NULL(data))
data = ti_thermal_build_data(bgp, id);
if (!data)
--
2.43.0