summaryrefslogtreecommitdiff
path: root/udevinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevinfo.c')
-rw-r--r--udevinfo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/udevinfo.c b/udevinfo.c
index b546488c7e..fadfaec945 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -170,19 +170,17 @@ exit:
static void dump_names(void) {
LIST_HEAD(name_list);
struct name_entry *name_loop;
- struct name_entry *tmp_loop;
udev_db_get_all_entries(&name_list);
- list_for_each_entry_safe(name_loop, tmp_loop, &name_list, node) {
+ list_for_each_entry(name_loop, &name_list, node) {
struct udevice udev_db;
udev_init_device(&udev_db, NULL, NULL, NULL);
- if (udev_db_get_device(&udev_db, name_loop->name) == 0) {
+ if (udev_db_get_device(&udev_db, name_loop->name) == 0)
printf("%s=%s/%s\n", udev_db.devpath, udev_root, udev_db.name);
- free(name_loop);
- }
udev_cleanup_device(&udev_db);
}
+ name_list_cleanup(&name_list);
}
int main(int argc, char *argv[], char *envp[])