mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
x86: acpi: Add memset to initialize SPCR table
Add a missing memset to acpi_create_spcr().
The other acpi_create_xxxx() functions perform a memset on their
structures, acpi_create_spcr() does not and as a result the contents of
this table are partly uninitialized (and thus random after every reset).
Fixes: b288cd9600
("x86: acpi: Generate SPCR table")
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: fix the tags format in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
3f6966ab2b
commit
40edea3a07
1 changed files with 2 additions and 0 deletions
|
@ -252,6 +252,8 @@ static void acpi_create_spcr(struct acpi_spcr *spcr)
|
|||
int space_id;
|
||||
int ret = -ENODEV;
|
||||
|
||||
memset((void *)spcr, 0, sizeof(struct acpi_spcr));
|
||||
|
||||
/* Fill out header fields */
|
||||
acpi_fill_header(header, "SPCR");
|
||||
header->length = sizeof(struct acpi_spcr);
|
||||
|
|
Loading…
Reference in a new issue