]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitec38cc70c0fd70e412c631cb4927260ed0412c61
tree701da3a9640ebc330403f864429d7f41532b2efc
parent8dbd3aab8a48f7fe0b2b0de0daba5cdac38f9640
ACPI / utils: Drop reference in test for device presence

BugLink: https://bugs.launchpad.net/bugs/1838349
[ Upstream commit 54e3aca84e571559915998aa6cc05e5ac37c043b ]

When commit 8661423eea1a ("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: 8661423eea1a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/acpi/utils.c