mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user