diff options
author | Tom Rini <trini@ti.com> | 2014-10-22 13:51:45 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-10-22 13:51:45 -0400 |
commit | 68e80fdda1336068f40915388bbdacfd2b75233a (patch) | |
tree | deb28e65fdd601e47bf5564f67da3035a840e284 /drivers/core/lists.c | |
parent | 35d4fed320d577a4446531d7b9350ce40065c4b0 (diff) | |
parent | 8a9cd5ad6f89ab721a352cbb9264bea5ede68789 (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/core/lists.c')
-rw-r--r-- | drivers/core/lists.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c index 699f94b435..3a1ea85654 100644 --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -24,19 +24,12 @@ struct driver *lists_driver_lookup_name(const char *name) ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); struct driver *entry; - int len; if (!drv || !n_ents) return NULL; - len = strlen(name); - for (entry = drv; entry != drv + n_ents; entry++) { - if (strncmp(name, entry->name, len)) - continue; - - /* Full match */ - if (len == strlen(entry->name)) + if (!strcmp(name, entry->name)) return entry; } |