summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorMarkus Schneider-Pargmann (TI.com) <[email protected]>2026-01-27 12:03:36 +0100
committerTom Rini <[email protected]>2026-01-28 09:20:59 -0600
commit41cf66011fc80bd122c3ebbeda4218547c48c297 (patch)
tree0ed76649ef3ca0ed4be24c9dc5f8889fc8b6f8af /drivers/core
parent6f3e63b4de851357d81f74211f14fd3b577cae6c (diff)
dm: core: lists_bind_fdt: Replace found variable
'found' is only used at the end of the function to print a debug message. No need to maintain a variable if we can just return 0 immediately when a driver was bound successfully. Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Signed-off-by: Markus Schneider-Pargmann (TI.com) <[email protected]>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/lists.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 52ba6c7bfa0..9d1ca38212e 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -204,7 +204,6 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
const struct udevice_id *id;
struct driver *entry;
struct udevice *dev;
- bool found = false;
const char *name, *compat_list, *compat;
int compat_length, i;
int ret = 0;
@@ -275,14 +274,14 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
ret);
return log_msg_ret("bind", ret);
} else {
- found = true;
if (devp)
*devp = dev;
+ return 0;
}
break;
}
- if (!found && ret != -ENODEV)
+ if (ret != -ENODEV)
log_debug("No match for node '%s'\n", name);
return 0;