Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-17 16:41:09 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-17 16:41:11 +0200
commit4cbe52ddfc7bbde9af8a8276fb64045562349e88 (patch)
tree80091e7806a53a24c896e0c941f9eb1608ba1eeb
parenta9825cc33242a02b98b438750e859f23c5c0fbd0 (diff)
ACPI / utils: Drop reference in test for device presence
(bsc#1051510).
-rw-r--r--patches.fixes/ACPI-utils-Drop-reference-in-test-for-device-presenc.patch35
-rw-r--r--series.conf1
2 files changed, 36 insertions, 0 deletions
diff --git a/patches.fixes/ACPI-utils-Drop-reference-in-test-for-device-presenc.patch b/patches.fixes/ACPI-utils-Drop-reference-in-test-for-device-presenc.patch
new file mode 100644
index 0000000000..6e27ead003
--- /dev/null
+++ b/patches.fixes/ACPI-utils-Drop-reference-in-test-for-device-presenc.patch
@@ -0,0 +1,35 @@
+From 54e3aca84e571559915998aa6cc05e5ac37c043b Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Mon, 18 Mar 2019 21:47:09 +0300
+Subject: [PATCH] ACPI / utils: Drop reference in test for device presence
+Git-commit: 54e3aca84e571559915998aa6cc05e5ac37c043b
+Patch-mainline: v5.1-rc2
+References: bsc#1051510
+
+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>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/acpi/utils.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/acpi/utils.c
++++ b/drivers/acpi/utils.c
+@@ -798,6 +798,7 @@ bool acpi_dev_present(const char *hid, c
+ dev = bus_find_device(&acpi_bus_type, NULL, &match,
+ acpi_dev_present_cb);
+
++ put_device(dev);
+ return !!dev;
+ }
+ EXPORT_SYMBOL(acpi_dev_present);
diff --git a/series.conf b/series.conf
index 320d8e883e..2b1cdccb3f 100644
--- a/series.conf
+++ b/series.conf
@@ -21580,6 +21580,7 @@
patches.drm/0001-drm-vmwgfx-Don-t-double-free-the-mode-stored-in-par-.patch
patches.drivers/mmc-pxamci-fix-enum-type-confusion.patch
patches.drivers/mmc-davinci-remove-extraneous-__init-annotation.patch
+ patches.fixes/ACPI-utils-Drop-reference-in-test-for-device-presenc.patch
patches.drivers/ALSA-echoaudio-add-a-check-for-ioremap_nocache.patch
patches.drivers/ALSA-sb8-add-a-check-for-request_region.patch
patches.drivers/ALSA-firewire-motu-use-version-field-of-unit-directo.patch