mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Merge tag 'acpi-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki: "Modify a helper function in the ACPI core to match the behavior expected by its users so as to prevent NULL pointer dereferences and occasional memory corruption from occurring (Hans de Goede)" * tag 'acpi-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: scan: Make acpi_bus_get_device() clear return pointer on error
This commit is contained in:
@@ -586,6 +586,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device,
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
*device = NULL;
|
||||
|
||||
status = acpi_get_data_full(handle, acpi_scan_drop_device,
|
||||
(void **)device, callback);
|
||||
if (ACPI_FAILURE(status) || !*device) {
|
||||
|
||||
Reference in New Issue
Block a user