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:
|
||
---|---|---|
.. | ||
isst_if_common.c | ||
isst_if_common.h | ||
isst_if_mbox_msr.c | ||
isst_if_mbox_pci.c | ||
isst_if_mmio.c | ||
isst_tpmi.c | ||
isst_tpmi_core.c | ||
isst_tpmi_core.h | ||
Kconfig | ||
Makefile |