When the commit 8661423eea1a ("ACPI / utils: Add new acpi_dev_present helper") introduced new helper, it misses the fact that bus_find_device() takes a reference on the found device and callers haven't release it back. Drop the reference on the device in test for presence. Fixes: 8661423eea1a ("ACPI / utils: Add new acpi_dev_present helper") Cc: Hans de Goede <hdegoede@xxxxxxxxxx> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/acpi/utils.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.20.1