thermal/drivers/k3_j72xx_bandgap: Simplify code in k3_bgp_read_temp()

The return value of vtm_get_best_value() always >= 0, remove always
false expression 'dtemp < 0' in if statement.

Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
Link: https://lore.kernel.org/r/20241113005412.2254-1-rex.nie@jaguarmicro.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
Rex Nie 2024-11-13 08:54:12 +08:00 committed by Daniel Lezcano
parent e2ffb6c3a4
commit d8afb8cc8b

View File

@ -238,7 +238,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata,
K3_VTM_TS_STAT_DTEMP_MASK;
dtemp = vtm_get_best_value(s0, s1, s2);
if (dtemp < 0 || dtemp >= TABLE_SIZE)
if (dtemp >= TABLE_SIZE)
return -EINVAL;
*temp = derived_table[dtemp];