summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2026-08-11 15:21:34 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-07 17:18:19 +0200
commit49a95fe1f64f41c2e8959e525aefdb10f23b293e (patch)
tree3c79df57a2e55857d3cd8dd87bb7e520681867b2
parentefe7f25dd27e35063477b4b0e7eed3675669fd99 (diff)
downloadlinux-49a95fe1f64f41c2e8959e525aefdb10f23b293e.tar.gz
linux-49a95fe1f64f41c2e8959e525aefdb10f23b293e.zip
platform/x86: ISST: Add a NULL check for sst_inst[]
commit 3de2776e9d7073765c10c2326c2bda5926811ea6 upstream. To be consistent with other places, add a NULL check for failed socket loading by checking isst_common.sst_inst[]. Fixes: d805456c712f ("platform/x86: ISST: Enumerate TPMI SST and create framework") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20260811222134.3912626-3-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
index e5269c3dec96..a438f816a415 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
@@ -1312,6 +1312,8 @@ static int isst_if_get_tpmi_instance_count(void __user *argp)
return -EINVAL;
sst_inst = isst_common.sst_inst[tpmi_inst.socket_id];
+ if (!sst_inst)
+ return -EINVAL;
tpmi_inst.count = isst_instance_count(sst_inst);