]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: intel: hfi: Remove a pointless die_id check
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Mon, 28 Nov 2022 16:20:01 +0000 (08:20 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Dec 2022 19:47:52 +0000 (20:47 +0100)
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>
drivers/thermal/intel/intel_hfi.c

index 90a11eef44f7c83c399ad80987f812c4dd5ed6d3..6e604bda2b93976690df5d8a536fb6658bd31ead 100644 (file)
@@ -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];