diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-02-17 21:09:59 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-17 21:09:59 +0100 |
commit | 48c871c1f6a7c7044dd76774fb469e65c7e2e4e8 (patch) | |
tree | da3aa535c98cc0957851354ceb0fbff7482d7a9d /drivers/base/dd.c | |
parent | phy devices: use same arg types (diff) | |
parent | Convert network devices to use struct device instead of class_device (diff) | |
download | linux-48c871c1f6a7c7044dd76774fb469e65c7e2e4e8.tar.xz linux-48c871c1f6a7c7044dd76774fb469e65c7e2e4e8.zip |
Merge branch 'gfar' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into upstream
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index b5bf243d9cd6..6a48824e43ff 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -112,6 +112,7 @@ static int really_probe(void *void_data) atomic_inc(&probe_count); pr_debug("%s: Probing driver %s with device %s\n", drv->bus->name, drv->name, dev->bus_id); + WARN_ON(!list_empty(&dev->devres_head)); dev->driver = drv; if (driver_sysfs_add(dev)) { @@ -137,6 +138,7 @@ static int really_probe(void *void_data) goto done; probe_failed: + devres_release_all(dev); driver_sysfs_remove(dev); dev->driver = NULL; @@ -327,6 +329,7 @@ static void __device_release_driver(struct device * dev) dev->bus->remove(dev); else if (drv->remove) drv->remove(dev); + devres_release_all(dev); dev->driver = NULL; put_driver(drv); } |