Skip to content

Commit

Permalink
thermal: intel: hfi: Remove a pointless die_id check
Browse files Browse the repository at this point in the history
die_id is an u16 quantity. On single-die systems the default value of
die_id is 0. No need to check for negative values.

Plus, removing this check makes Coverity happy.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Ricardo Neri authored and Rafael J. Wysocki committed Dec 2, 2022
1 parent c0e3acd commit 3a3073b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/intel/intel_hfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ void intel_hfi_online(unsigned int cpu)
die_id = topology_logical_die_id(cpu);
hfi_instance = info->hfi_instance;
if (!hfi_instance) {
if (die_id < 0 || die_id >= max_hfi_instances)
if (die_id >= max_hfi_instances)
return;

hfi_instance = &hfi_instances[die_id];
Expand Down

0 comments on commit 3a3073b

Please sign in to comment.