Commit 1fbbb629 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI fixes from Rafael Wysocki:
 "These address 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)"

* tag 'acpi-6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPICA: Switch back to using strncpy() in acpi_ut_safe_strncpy()
  ACPI: MRRM: Silence error code static checker warning
  ACPI: APEI: EINJ: Clean up on error in einj_probe()
parents 976aa630 f4c606df
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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;
}

+1 −1
Original line number Diff line number Diff line
@@ -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());