mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00: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:
parent
e2ffb6c3a4
commit
d8afb8cc8b
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user