Skip to content

Commit

Permalink
driver core: Remove dpm_sysfs_remove() from error path of device_add()
Browse files Browse the repository at this point in the history
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@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rafael J. Wysocki authored and Greg Kroah-Hartman committed Mar 4, 2008
1 parent 1b3cbec commit 135dee0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 135dee0

Please sign in to comment.