Some Kconfig defined devices may be defined using dt_chosen_label function. Since there is no way to ensure a device enabled in dts is also defined in Kconfig, it may happen that instance is not actually defined. In this case device_get_binding might return 0, leading to undefined behavior in the function that calls it. When not already done, systematically check return of function device_get_binding on devices defined through dt_chosen_label macro. Trigger ASSERT when required and return error when possible. Fixes #20068 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org> |
||
|---|---|---|
| .. | ||
| modules | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Kconfig.backends | ||
| Kconfig.template.shell_log_queue_size | ||
| Kconfig.template.shell_log_queue_timeout | ||
| shell_cmds.c | ||
| shell_dummy.c | ||
| shell_fprintf.c | ||
| shell_help.c | ||
| shell_help.h | ||
| shell_history.c | ||
| shell_log_backend.c | ||
| shell_ops.c | ||
| shell_ops.h | ||
| shell_rtt.c | ||
| shell_telnet_protocol.h | ||
| shell_telnet.c | ||
| shell_uart.c | ||
| shell_utils.c | ||
| shell_utils.h | ||
| shell_vt100.h | ||
| shell_wildcard.c | ||
| shell_wildcard.h | ||
| shell.c | ||