'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 <simon.glass@canonical.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
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;
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;