mirror of
https://xff.cz/git/u-boot/
synced 2025-10-26 16:13:55 +01:00
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>
This commit is contained in:
@@ -23,6 +23,8 @@ struct uclass *uclass_find(enum uclass_id key)
|
||||
{
|
||||
struct uclass *uc;
|
||||
|
||||
if (!gd->dm_root)
|
||||
return NULL;
|
||||
/*
|
||||
* TODO(sjg@chromium.org): Optimise this, perhaps moving the found
|
||||
* node to the start of the list, or creating a linear array mapping
|
||||
|
||||
Reference in New Issue
Block a user