1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/platform/x86/intel/speed_select_if
Srinivas Pandruvada 46ee21e9f5
platform/x86: ISST: Fix return value on last invalid resource
When only the last resource is invalid, tpmi_sst_dev_add() is returing
error even if there are other valid resources before. This function
should return error when there are no valid resources.

Here tpmi_sst_dev_add() is returning "ret" variable. But this "ret"
variable contains the failure status of last call to sst_main(), which
failed for the invalid resource. But there may be other valid resources
before the last entry.

To address this, do not update "ret" variable for sst_main() return
status.

If there are no valid resources, it is already checked for by !inst
below the loop and -ENODEV is returned.

Fixes: 9d1d36268f ("platform/x86: ISST: Support partitioned systems")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org # 6.10+
Link: https://lore.kernel.org/r/20240816163626.415762-1-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>
2024-08-20 14:19:09 +03:00
..
isst_if_common.c platform/x86: ISST: Use only TPMI interface when present 2024-05-31 16:24:45 +03:00
isst_if_common.h platform/x86: ISST: Avoid some SkyLake server models 2024-05-31 16:24:43 +03:00
isst_if_mbox_msr.c platform/x86: intel_speed_select_if: Switch to new Intel CPU model defines 2024-06-03 09:49:12 +03:00
isst_if_mbox_pci.c platform/x86: intel_speed_select_if: Move to intel sub-directory 2021-08-20 20:11:22 +02:00
isst_if_mmio.c platform/x86: intel_speed_select_if: Use devm_ioremap_resource 2023-10-04 11:10:31 +03:00
isst_tpmi.c platform/x86: ISST: Add suspend/resume callbacks 2023-03-16 15:18:02 +01:00
isst_tpmi_core.c platform/x86: ISST: Fix return value on last invalid resource 2024-08-20 14:19:09 +03:00
isst_tpmi_core.h platform/x86: ISST: Add suspend/resume callbacks 2023-03-16 15:18:02 +01:00
Kconfig platform/x86: ISST: Enumerate TPMI SST and create framework 2023-03-16 15:18:02 +01:00
Makefile platform/x86: ISST: Enumerate TPMI SST and create framework 2023-03-16 15:18:02 +01:00