Skip to content
Commit d56e4f75 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen
Browse files

tpm: fix compat 'ppi' link handling in tpm_chip_register()



__compat_only_sysfs_link_entry_to_kobj() was unconditionally called for
TPM1 chips, which caused crash on Acer C720 laptop where DSM for the
ACPI object did not exist.

There are two reasons for unwanted behavior:

* The code did not check whether
  __compat_only_sysfs_link_entry_to_kobj() returned -ENOENT. This is
  OK. It just meanst that ppi is not available.
* The code did not clean up properly. Compat link should added only
  after all other init is done.

This patch sorts out these issues.

Fixes: 9b774d5c
Reported-by: default avatarJeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: default avatarJeremiah Mahler <jmmahler@gmail.com>
Acked-by: default avatarPeter Huewe <PeterHuewe@gmx.de>
parent 2e31125c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment