summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>2022-11-28 08:20:01 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-12-02 20:47:52 +0100
commit3a3073b69c76a8909374c5f9d610ea2f02ba3402 (patch)
treef613212f113cafd23e30549ff6371a25e71ae1d3 /drivers/thermal
parentc0e3acdcdeb14099765de38224dfe0ad019c8482 (diff)
downloadlinux-3a3073b69c76a8909374c5f9d610ea2f02ba3402.tar.bz2
thermal: intel: hfi: Remove a pointless die_id check
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/intel/intel_hfi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c
index 90a11eef44f7..6e604bda2b93 100644
--- a/drivers/thermal/intel/intel_hfi.c
+++ b/drivers/thermal/intel/intel_hfi.c
@@ -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];