dm: Avoid accessing uclasses before they are ready

Don't allow access to uclasses before they have been initialised.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index 346cf08..672497d 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -95,7 +95,7 @@
 You should see something like this:
 
     <...U-Boot banner...>
-    Running 16 driver model tests
+    Running 17 driver model tests
     Test: dm_test_autobind
     Test: dm_test_autoprobe
     Test: dm_test_children
@@ -116,6 +116,7 @@
     Test: dm_test_pre_reloc
     Test: dm_test_remove
     Test: dm_test_uclass
+    Test: dm_test_uclass_before_ready
     Failures: 0