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: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Cornelia Huck 2007-01-08 20:16:41 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 43cb76d91e
Коммит 717e48c29d
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -1004,10 +1004,6 @@ int device_move(struct device *dev, struct device *new_parent)
if (!dev) if (!dev)
return -EINVAL; return -EINVAL;
if (!device_is_registered(dev)) {
error = -EINVAL;
goto out;
}
new_parent = get_device(new_parent); new_parent = get_device(new_parent);
if (!new_parent) { if (!new_parent) {
error = -EINVAL; error = -EINVAL;