diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-22 12:07:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-22 12:07:06 -0700 |
commit | 2c1ada4f052d6d5e5c0bf7901617479b2146139e (patch) | |
tree | 7389f65d15923952ae998e67cdcf14a7ca0068e3 | |
parent | b44290a022dcffb5ca3b75300e571fad06214bc7 (diff) | |
parent | 54e3aca84e571559915998aa6cc05e5ac37c043b (diff) | |
download | lwn-2c1ada4f052d6d5e5c0bf7901617479b2146139e.tar.gz lwn-2c1ada4f052d6d5e5c0bf7901617479b2146139e.zip |
Merge tag 'acpi-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki:
"Prevent device references acquired by bus_find_device() in
acpi_dev_present() from being leaked (Andy Shevchenko)"
* tag 'acpi-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / utils: Drop reference in test for device presence
-rw-r--r-- | drivers/acpi/utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 78db97687f26..c4b06cc075f9 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -800,6 +800,7 @@ bool acpi_dev_present(const char *hid, const char *uid, s64 hrv) match.hrv = hrv; dev = bus_find_device(&acpi_bus_type, NULL, &match, acpi_dev_match_cb); + put_device(dev); return !!dev; } EXPORT_SYMBOL(acpi_dev_present); |