diff options
author | David E. Box <david.e.box@linux.intel.com> | 2021-08-18 01:40:17 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-08-20 13:09:41 +0300 |
commit | ef195e8a7f43924b9979b2cd81ac7fa54f24bb3c (patch) | |
tree | e541c99bcb33736a20ddd2bdc7fcf2f852db93f5 /drivers/platform/x86/intel/pmt | |
parent | 3ae86d2d4704796ee658a34245cb86e68c40c5d7 (diff) | |
download | linux-ef195e8a7f43924b9979b2cd81ac7fa54f24bb3c.tar.xz |
platform/x86: intel_pmt_telemetry: Ignore zero sized entries
Some devices may expose non-functioning entries that are reserved for
future use. These entries have zero size. Ignore them during probe.
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20210817224018.1013192-5-david.e.box@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/intel/pmt')
-rw-r--r-- | drivers/platform/x86/intel/pmt/telemetry.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/pmt/telemetry.c b/drivers/platform/x86/intel/pmt/telemetry.c index a58843360fbf..38d52651c572 100644 --- a/drivers/platform/x86/intel/pmt/telemetry.c +++ b/drivers/platform/x86/intel/pmt/telemetry.c @@ -61,6 +61,14 @@ static int pmt_telem_header_decode(struct intel_pmt_entry *entry, /* Size is measured in DWORDS, but accessor returns bytes */ header->size = TELEM_SIZE(readl(disc_table)); + /* + * Some devices may expose non-functioning entries that are + * reserved for future use. They have zero size. Do not fail + * probe for these. Just ignore them. + */ + if (header->size == 0) + return 1; + return 0; } |