Skip to contentSkip to conversation

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

PATCH In review Cornelia Huck 1 participant 1 message Jan 8, 2007 Driver core

lore
Share & tools
lore
#0 lore raw

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.

---
 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, stru
 	if (!dev)
 		return -EINVAL;
 
-	if (!device_is_registered(dev)) {
-		error = -EINVAL;
-		goto out;
-	}
 	new_parent = get_device(new_parent);
 	if (!new_parent) {
 		error = -EINVAL;