diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-26 13:55:17 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-26 13:55:17 +0300 |
| commit | 71e69d7adee10a55b817df748dec5bfec7bf4c30 (patch) | |
| tree | ac342851e20df5a5f7891cc603998b654d26724c /include/acpi | |
| parent | 03b1292d1c0ea195e025e667555d74db7da82026 (diff) | |
| parent | ff1176468d368232b684f75e82563369208bc371 (diff) | |
| download | linux-71e69d7adee10a55b817df748dec5bfec7bf4c30.tar.xz | |
Merge 5.14-rc3 into char-misc-next
We need the char-misc fixes from 5.14-rc3 into here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/acpi_bus.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 1ae993fee4a5..13d93371790e 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -707,11 +707,6 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv); * @hrv: Hardware Revision of the device, pass -1 to not check _HRV * * The caller is responsible for invoking acpi_dev_put() on the returned device. - * - * FIXME: Due to above requirement there is a window that may invalidate @adev - * and next iteration will use a dangling pointer, e.g. in the case of a - * hotplug event. That said, the caller should ensure that this will never - * happen. */ #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = acpi_dev_get_first_match_dev(hid, uid, hrv); \ @@ -725,7 +720,8 @@ static inline struct acpi_device *acpi_dev_get(struct acpi_device *adev) static inline void acpi_dev_put(struct acpi_device *adev) { - put_device(&adev->dev); + if (adev) + put_device(&adev->dev); } struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle); |
