From 8f02c4397c841b88ee1831c57768390a8b6a3973 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 3 Mar 2012 13:29:20 -0800 Subject: [PATCH] --- yaml --- r: 298030 b: refs/heads/master c: 89e96ada572fb216e582dbe3f64e1a6939a37f74 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/pnp/pnpacpi/core.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c50865fae8c2..1ad70b1e33e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ac909ec308ce8d5177963c780564824d12bc3fa2 +refs/heads/master: 89e96ada572fb216e582dbe3f64e1a6939a37f74 diff --git a/trunk/drivers/pnp/pnpacpi/core.c b/trunk/drivers/pnp/pnpacpi/core.c index b00c17612a89..d21e8f59c84e 100644 --- a/trunk/drivers/pnp/pnpacpi/core.c +++ b/trunk/drivers/pnp/pnpacpi/core.c @@ -321,9 +321,14 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp) { struct acpi_device *acpi = to_acpi_device(dev); struct pnp_dev *pnp = _pnp; + struct device *physical_device; + + physical_device = acpi_get_physical_device(acpi->handle); + if (physical_device) + put_device(physical_device); /* true means it matched */ - return !acpi_get_physical_device(acpi->handle) + return !physical_device && compare_pnp_id(pnp->id, acpi_device_hid(acpi)); }