mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-11 01:19:39 -04:00
Merge branches 'acpica', 'acpi-tables' and 'acpi-apei'
Merge fixes for issues introduced by recent ACPI changes merged previously: - Unbreak acpi_ut_safe_strncpy() by restoring its previous behavior changed incorrectly by a recent update (Ahmed Salem). - Make a new static checker warning in the recently introduced ACPI MRRM table parser go away (Dan Carpenter). - Fix ACPI table referece leak in error path of einj_probe() (Dan Carpenter). * acpica: ACPICA: Switch back to using strncpy() in acpi_ut_safe_strncpy() * acpi-tables: ACPI: MRRM: Silence error code static checker warning * acpi-apei: ACPI: APEI: EINJ: Clean up on error in einj_probe()
This commit is contained in:
@@ -157,8 +157,10 @@ static __init int add_boot_memory_ranges(void)
|
||||
|
||||
for (int i = 0; i < mrrm_mem_entry_num; i++) {
|
||||
name = kasprintf(GFP_KERNEL, "range%d", i);
|
||||
if (!name)
|
||||
if (!name) {
|
||||
ret = -ENOMEM;
|
||||
break;
|
||||
}
|
||||
|
||||
kobj = kobject_create_and_add(name, pkobj);
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size)
|
||||
{
|
||||
/* Always terminate destination string */
|
||||
|
||||
memcpy(dest, source, dest_size);
|
||||
strncpy(dest, source, dest_size);
|
||||
dest[dest_size - 1] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -766,7 +766,7 @@ static int __init einj_probe(struct faux_device *fdev)
|
||||
|
||||
rc = einj_get_available_error_type(&available_error_type);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto err_put_table;
|
||||
|
||||
rc = -ENOMEM;
|
||||
einj_debug_dir = debugfs_create_dir("einj", apei_get_debugfs_dir());
|
||||
|
||||
Reference in New Issue
Block a user