Skip to content

Commit e7fcfe6

Browse files
Yang Lirafaeljw
authored andcommitted
thermal: intel: Fix unsigned comparison with less than zero
The return value from the call to intel_tcc_get_tjmax() is int, which can be a negative error code. However, the return value is being assigned to an u32 variable 'tj_max', so making 'tj_max' an int. Eliminate the following warning: ./drivers/thermal/intel/intel_soc_dts_iosf.c:394:5-11: WARNING: Unsigned expression compared with zero: tj_max < 0 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3637 Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Acked-by: Zhang Rui <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 58374a3 commit e7fcfe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/intel/intel_soc_dts_iosf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(
380380
{
381381
struct intel_soc_dts_sensors *sensors;
382382
bool notification;
383-
u32 tj_max;
383+
int tj_max;
384384
int ret;
385385
int i;
386386

0 commit comments

Comments
 (0)