diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/lists.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c index c49695b24f..3878957c9e 100644 --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -222,6 +222,7 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp, log_debug(" - attempt to match compatible string '%s'\n", compat); + id = NULL; for (entry = driver; entry != driver + n_ents; entry++) { if (drv) { if (drv != entry) @@ -250,7 +251,8 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp, entry->name, entry->of_match->compatible, id->compatible); ret = device_bind_with_driver_data(parent, entry, name, - id->data, node, &dev); + id ? id->data : 0, node, + &dev); if (ret == -ENODEV) { log_debug("Driver '%s' refuses to bind\n", entry->name); continue; |