driver core: prevent device_for_each_child from oopsing
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 15 Apr 2009 23:00:12 +0000 (16:00 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Apr 2009 23:17:11 +0000 (16:17 -0700)
David Vrabel noticed that the wireless usb stack likes to call
device_for_each_chile() with an empty bus.  This used to work fine, but
now oopses.  This patch fixes the oops and makes the code behave like it
used to.

Reported-by: David Vrabel <david.vrabel@csr.com>
Tested-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

No differences found