提交 135dee0c 编写于 作者: R Rafael J. Wysocki 提交者: Greg Kroah-Hartman

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: NRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1b3cbec1
...@@ -839,7 +839,6 @@ int device_add(struct device *dev) ...@@ -839,7 +839,6 @@ int device_add(struct device *dev)
return error; return error;
BusError: BusError:
device_pm_remove(dev); device_pm_remove(dev);
dpm_sysfs_remove(dev);
PMError: PMError:
if (dev->bus) if (dev->bus)
blocking_notifier_call_chain(&dev->bus->p->bus_notifier, blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册