summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-17 20:53:16 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-17 20:53:16 (GMT)
commit74a205a3f1a07cf0b72bf7816d75735a0d9c4c6b (patch)
treed977fe81c74a0728130c7e212f2c27eef8146e91 /drivers/base/core.c
parentdd26bf6d95f050c42cc8f15e750b09851e1fd30b (diff)
parent912335c43bb10d124471bf063a85e132aa814214 (diff)
downloadlinux-fsl-qoriq-74a205a3f1a07cf0b72bf7816d75735a0d9c4c6b.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: UIO: fix specific device driver missing statement for depmod Driver core: remove pr_fmt() from dynamic_dev_dbg() printk driver core: prevent device_for_each_child from oopsing dynamic debug: resurrect old pr_debug() semantics as pr_devel() Driver Core: early platform driver proc: mounts_poll() make consistent to mdstat_poll sysfs: sysfs poll keep the poll rule of regular file. driver core: allow non-root users to listen to uevents driver core: fix driver_match_device sysfs: don't use global workqueue in sysfs_schedule_callback()
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index e73c92d..d230ff4 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1142,6 +1142,9 @@ int device_for_each_child(struct device *parent, void *data,
struct device *child;
int error = 0;
+ if (!parent->p)
+ return 0;
+
klist_iter_init(&parent->p->klist_children, &i);
while ((child = next_device(&i)) && !error)
error = fn(child, data);