From: Cornelia Huck Date: Mon, 8 Jan 2007 19:16:41 +0000 (+0100) Subject: driver core: Remove device_is_registered() in device_move(). X-Git-Tag: v2.6.21-rc1~92^2~30^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=717e48c29d9a58f4d31c1651bec364212da5f6b2;p=linux-2.6 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 Cc: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/core.c b/drivers/base/core.c index 67b79a7592..36eedfdeb5 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -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;