提交 d14ec468 编写于 作者: M mpiglet 提交者: Wang ShaoBo

arm64/mpam: add return value check for acpi_get_table()

openEuler inclusion
category: bugfix
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=339
CVE: NA
Reference: https://gitee.com/openeuler/kernel/issues/I3U11D

---------------------------------------------------

This fix check return value of acpi_get_table().

MPAM driver need to check return value, thus we need to check
the return value of acpi_get_table(ACPI_SIG_PPTT, 0, &pptt).
Signed-off-by: Nmpiglet <mpiglet@outlook.com>
Reviewed-by: Jian Cheng <cj.chengjian(a)huawei.com>
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
上级 30ab85ad
...@@ -255,7 +255,7 @@ int __init acpi_mpam_parse(void) ...@@ -255,7 +255,7 @@ int __init acpi_mpam_parse(void)
return -ENOENT; return -ENOENT;
/* PPTT is optional, there may be no mpam cache controls */ /* PPTT is optional, there may be no mpam cache controls */
acpi_get_table(ACPI_SIG_PPTT, 0, &pptt); status = acpi_get_table(ACPI_SIG_PPTT, 0, &pptt);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
pptt = NULL; pptt = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册