thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 16 Jun 2020 09:19:49 +0000 (12:19 +0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 21 Jul 2020 13:13:17 +0000 (15:13 +0200)
This condition is reversed and will cause breakage.

Fixes: 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200616091949.GA11940@mwanda
drivers/thermal/ti-soc-thermal/ti-thermal-common.c

index 85776db..2ce4b19 100644 (file)
@@ -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)