Skip to content

Commit

Permalink
driver core: Remove device_is_registered() in device_move().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cornelia Huck authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent 43cb76d commit 717e48c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 717e48c

Please sign in to comment.