summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-01-21 11:28:30 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-01-21 11:28:30 -0800
commit6a52f4cf863a53b8196286e2b95d3ef3bd8183ad (patch)
treecc50a30af2a34138436eef5e783b0bb4b4c80617 /drivers
parent120fbdb84f339ca3c358e4ac3fb1ffe663669d28 (diff)
parent78a18fec5258c8df9435399a1ea022d73d3eceb9 (diff)
downloadlinux-6a52f4cf863a53b8196286e2b95d3ef3bd8183ad.tar.bz2
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/scan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 58ff36340cd7..1db063b02f63 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -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) {