diff options
author | Jithu Joseph <jithu.joseph@intel.com> | 2022-11-16 19:59:21 -0800 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-11-18 21:30:36 +0100 |
commit | f4e209e956b5d66f0e6e34e89f19811c2c1e596e (patch) | |
tree | 8573f7cd46fe485af85a0f6babc7e2ed7fa014fc /drivers/platform | |
parent | 10d4853e4c5cd64b9ef1e5579bb2e89bceab4175 (diff) | |
download | linux-f4e209e956b5d66f0e6e34e89f19811c2c1e596e.tar.gz linux-f4e209e956b5d66f0e6e34e89f19811c2c1e596e.tar.bz2 linux-f4e209e956b5d66f0e6e34e89f19811c2c1e596e.zip |
platform/x86/intel/ifs: Return a more appropriate error code
scan_chunks_sanity_check() returns -ENOMEM if it encounters an error
while copying IFS test image from memory to Secure Memory.
Return -EIO in this scenario, as it is more appropriate.
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20221117035935.4136738-3-jithu.joseph@intel.com
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/intel/ifs/load.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c index d056617ddc85..89ce265887ea 100644 --- a/drivers/platform/x86/intel/ifs/load.c +++ b/drivers/platform/x86/intel/ifs/load.c @@ -157,8 +157,10 @@ static int scan_chunks_sanity_check(struct device *dev) INIT_WORK(&local_work.w, copy_hashes_authenticate_chunks); schedule_work_on(cpu, &local_work.w); wait_for_completion(&ifs_done); - if (ifsd->loading_error) + if (ifsd->loading_error) { + ret = -EIO; goto out; + } package_authenticated[curr_pkg] = 1; } ret = 0; |