From: Rafael J. Wysocki Date: Mon, 3 Mar 2008 22:46:51 +0000 (+0100) Subject: driver core: Remove dpm_sysfs_remove() from error path of device_add() X-Git-Tag: v2.6.25-rc4~5^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=135dee0cd0eb2638fab899b428e51f00e8c046a8;p=linux-2.6 driver core: Remove dpm_sysfs_remove() from error path of device_add() 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/core.c b/drivers/base/core.c index 1e2e0fa8a4..7f59c2f2eb 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,