提交 717e48c2 编写于 作者: C Cornelia Huck 提交者: Greg Kroah-Hartman

driver core: Remove device_is_registered() in device_move().

device_is_registered() will always be false for a device with no bus. Remove
this check and trust the caller to know what they're doing.
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 43cb76d9
......@@ -1004,10 +1004,6 @@ int device_move(struct device *dev, struct device *new_parent)
if (!dev)
return -EINVAL;
if (!device_is_registered(dev)) {
error = -EINVAL;
goto out;
}
new_parent = get_device(new_parent);
if (!new_parent) {
error = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册