Skip to content

Commit 2920141

Browse files
spandruvadajwrdegoede
authored andcommitted
platform/x86/intel/tpmi: Handle error from tpmi_process_info()
When tpmi_process_info() returns error, fail to load the driver. This can happen if call to ioremap() returns error. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Cc: stable@vger.kernel.org # v6.3+ Link: https://lore.kernel.org/r/20240423204619.3946901-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 22813a1 commit 2920141

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • drivers/platform/x86/intel

drivers/platform/x86/intel/tpmi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,11 @@ static int intel_vsec_tpmi_init(struct auxiliary_device *auxdev)
763763
* when actual device nodes created outside this
764764
* loop via tpmi_create_devices().
765765
*/
766-
if (pfs->pfs_header.tpmi_id == TPMI_INFO_ID)
767-
tpmi_process_info(tpmi_info, pfs);
766+
if (pfs->pfs_header.tpmi_id == TPMI_INFO_ID) {
767+
ret = tpmi_process_info(tpmi_info, pfs);
768+
if (ret)
769+
return ret;
770+
}
768771

769772
if (pfs->pfs_header.tpmi_id == TPMI_CONTROL_ID)
770773
tpmi_set_control_base(auxdev, tpmi_info, pfs);

0 commit comments

Comments
 (0)