Skip to content

Commit

Permalink
Merge tag 'acpi-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Mar 22, 2019
2 parents b44290a + 54e3aca commit 2c1ada4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2c1ada4

Please sign in to comment.