[PATCH 6/8] driver core: Remove dpm_sysfs_remove() from error path of device_add()

From: Greg Kroah-Hartman
Date: Tue Mar 04 2008 - 18:27:28 EST


From: Rafael J. Wysocki <rjw@xxxxxxx>

Since device_pm_remove(dev) calls dpm_sysfs_remove(dev), it's
incorrect to call the latter after the former in the device_add()
error path.

Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/base/core.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 1e2e0fa..7f59c2f 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -839,7 +839,6 @@ int device_add(struct device *dev)
return error;
BusError:
device_pm_remove(dev);
- dpm_sysfs_remove(dev);
PMError:
if (dev->bus)
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
--
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/