Skip to content

Commit 2bbfa0a

Browse files
aubreylirafaeljw
authored andcommitted
ACPI: PRM: Deal with table not present or no module found
On the system PRMT table is not present, dmesg output: $ dmesg | grep PRM [ 1.532237] ACPI: PRMT not present [ 1.532237] PRM: found 4294967277 modules The result of acpi_table_parse_entries need to be checked and return immediately if PRMT table is not present or no PRM module found. Signed-off-by: Aubrey Li <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7c60610 commit 2bbfa0a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/acpi/prmt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ void __init init_prmt(void)
292292
int mc = acpi_table_parse_entries(ACPI_SIG_PRMT, sizeof(struct acpi_table_prmt) +
293293
sizeof (struct acpi_table_prmt_header),
294294
0, acpi_parse_prmt, 0);
295+
/*
296+
* Return immediately if PRMT table is not present or no PRM module found.
297+
*/
298+
if (mc <= 0)
299+
return;
300+
295301
pr_info("PRM: found %u modules\n", mc);
296302

297303
status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,

0 commit comments

Comments
 (0)