driver core: Remove device_is_registered() in device_move().
PATCH 1/2 driver core: Remove device_is_registered() in device_move().
From: Cornelia Huck <[email protected]>
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 <[email protected]>
--- drivers/base/core.c | 4 ---- 1 files changed, 4 deletions(-)
drivers/base/core.c +0 -4
@@ -1066,10 +1066,6 @@ int device_move(struct device *dev, struif (!dev)return -EINVAL ; -if (!device_is_registered (dev)) { - error = -EINVAL ; - goto out; - } new_parent =get_device (new_parent);if (!new_parent) { error = -EINVAL ;