summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-11-17 17:19:40 +0900
committerSimon Glass <sjg@chromium.org>2014-11-22 10:16:49 +0100
commitf724e0bba2967397545bd48992bba66452d6759d (patch)
tree61e4988acf9cc21b89cb87f441ed31a00093a614 /drivers/core
parent84a71537333e05b920a5679b4b18d61fc925fefa (diff)
downloadu-boot-imx-f724e0bba2967397545bd48992bba66452d6759d.zip
u-boot-imx-f724e0bba2967397545bd48992bba66452d6759d.tar.gz
u-boot-imx-f724e0bba2967397545bd48992bba66452d6759d.tar.bz2
dm: core: remove unnecessary return condition in driver lookup
The variable "drv" never becomes NULL because ll_entry_start() always returns a valid pointer even if there are no entries. The case "n_ents == 0" is covered by the following "for" loop. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/lists.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 3a1823d..058f278 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -25,9 +25,6 @@ struct driver *lists_driver_lookup_name(const char *name)
const int n_ents = ll_entry_count(struct driver, driver);
struct driver *entry;
- if (!drv || !n_ents)
- return NULL;
-
for (entry = drv; entry != drv + n_ents; entry++) {
if (!strcmp(name, entry->name))
return entry;