Skip to contentSkip to conversation

thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()

PATCH Applied Dan Carpenter 2 participants 2 messages Jun 16, 2020 – Jul 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()

This condition is reversed and will cause breakage.

Fixes 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR")
---
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/ti-soc-thermal/ti-thermal-common.c +1 -1
index 85776db4bf34..2ce4b19f312a 100644
@@ -169,7 +169,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
 
 	data = ti_bandgap_get_sensor_data(bgp, id);
 
-	if (!IS_ERR_OR_NULL(data))
+	if (IS_ERR_OR_NULL(data))
 		data = ti_thermal_build_data(bgp, id);
 
 	if (!data)
Signature · 1 line
2.27.0
#1 lore raw
Quoted 5 lines · Dan Carpenter

This condition is reversed and will cause breakage.

Fixes 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR")

---

Applied.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog