Skip to content

Commit d8afb8c

Browse files
Rex Niedlezcano
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent e2ffb6c commit d8afb8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/k3_j72xx_bandgap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata,
238238
K3_VTM_TS_STAT_DTEMP_MASK;
239239
dtemp = vtm_get_best_value(s0, s1, s2);
240240

241-
if (dtemp < 0 || dtemp >= TABLE_SIZE)
241+
if (dtemp >= TABLE_SIZE)
242242
return -EINVAL;
243243

244244
*temp = derived_table[dtemp];

0 commit comments

Comments
 (0)