]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / utils: Drop reference in test for device presence
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 18 Mar 2019 18:47:09 +0000 (21:47 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Mar 2019 21:34:21 +0000 (22:34 +0100)
commitf665b5a99a46bd13e1d71ff2e7e5f18798fa5d56
tree61c10f3669a9cd1066856d73187467eb12a9e87d
parent805099b2fb57eba3d69bc38aeb447dfe76b0ebb9
ACPI / utils: Drop reference in test for device presence

When commit 7ad84d3d6545 ("ACPI / utils: Add new acpi_dev_present
helper") introduced acpi_dev_present(), it missed the fact that
bus_find_device() took a reference on the device found by it and
the callers of acpi_dev_present() don't drop that reference.

Drop the reference on the device in acpi_dev_present().

Fixes: 7ad84d3d6545 ("ACPI / utils: Add new acpi_dev_present helper")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/utils.c