ACPI: NFIT: Fix incorrect calculation of idt size
authorYu Liao <liaoyu15@huawei.com>
Sat, 26 Aug 2023 07:16:53 +0000 (15:16 +0800)
committerDave Jiang <dave.jiang@intel.com>
Mon, 25 Sep 2023 19:25:30 +0000 (12:25 -0700)
commit33908660e814203e996f6e775d033c5c32fcf9a7
treee06b0e18b16a70f05adfac268f523386f900ee00
parent6465e260f48790807eef06b583b38ca9789b6072
ACPI: NFIT: Fix incorrect calculation of idt size

acpi_nfit_interleave's field 'line_offset' is switched to flexible array [1],
but sizeof_idt() still calculates the size in the form of 1-element array.

Therefore, fix incorrect calculation in sizeof_idt().

[1] https://lore.kernel.org/lkml/2652195.BddDVKsqQX@kreacher/

Fixes: 2a5ab99847bd ("ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array")
Cc: stable@vger.kernel.org # v6.4+
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20230826071654.564372-1-liaoyu15@huawei.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/acpi/nfit/core.c