On Fri, 16 Aug 2024, Srinivas Pandruvada wrote:
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.
Fixes: 9d1d36268f3d ("platform/x86: ISST: Support partitioned systems") Signed-off-by: Srinivas Pandruvada srinivas.pandruvada@linux.intel.com Cc: stable@vger.kernel.org # 6.10+
Thanks for the patch. Applied to review-ilpo.
While applying, I added the answer to the obvious question: why no new checks are needed for the no valid resources case (essentially, noting the existing !inst check).