diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-11-17 17:19:41 +0900 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-22 10:16:49 +0100 |
commit | 17b28edb37a33d0c89089faf36e4edd7084f65fa (patch) | |
tree | 14eb667cd340050195cb5496f61a11b0194b956f /drivers | |
parent | f724e0bba2967397545bd48992bba66452d6759d (diff) | |
download | u-boot-imx-17b28edb37a33d0c89089faf36e4edd7084f65fa.zip u-boot-imx-17b28edb37a33d0c89089faf36e4edd7084f65fa.tar.gz u-boot-imx-17b28edb37a33d0c89089faf36e4edd7084f65fa.tar.bz2 |
dm: core: remove unnecessary return condition in uclass lookup
These conditions never happen.
- There is no real uclass with UCLASS_INVALID id.
- uclass never becomes NULL because ll_entry_start() always returns
a valid pointer.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/core/lists.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c index 058f278..ff115c4 100644 --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -41,9 +41,6 @@ struct uclass_driver *lists_uclass_lookup(enum uclass_id id) const int n_ents = ll_entry_count(struct uclass_driver, uclass); struct uclass_driver *entry; - if ((id == UCLASS_INVALID) || !uclass) - return NULL; - for (entry = uclass; entry != uclass + n_ents; entry++) { if (entry->id == id) return entry; |