mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
dm: core: Skip adding uclasses with OF_PLATDATA_INST
There is no need to ever add new uclasses since these are set up at build time. Update the code to return an error if this is attempted. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
967a7d483a
commit
91bcfdf0b6
@ -148,8 +148,11 @@ int uclass_get(enum uclass_id id, struct uclass **ucp)
|
||||
|
||||
*ucp = NULL;
|
||||
uc = uclass_find(id);
|
||||
if (!uc)
|
||||
if (!uc) {
|
||||
if (CONFIG_IS_ENABLED(OF_PLATDATA_INST))
|
||||
return -ENOENT;
|
||||
return uclass_add(id, ucp);
|
||||
}
|
||||
*ucp = uc;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user