diff options
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 110230d86527..61515ef91184 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * drivers/base/core.c - core driver model code (device registration, etc) * @@ -5,9 +6,6 @@ * Copyright (c) 2002-3 Open Source Development Labs * Copyright (c) 2006 Greg Kroah-Hartman <gregkh@suse.de> * Copyright (c) 2006 Novell, Inc. - * - * This file is released under the GPLv2 - * */ #include <linux/device.h> @@ -2116,7 +2114,7 @@ int device_for_each_child(struct device *parent, void *data, return 0; klist_iter_init(&parent->p->klist_children, &i); - while ((child = next_device(&i)) && !error) + while (!error && (child = next_device(&i))) error = fn(child, data); klist_iter_exit(&i); return error; |