Skip to content
Commit 2716cbca authored by Erwan Gouriou's avatar Erwan Gouriou Committed by Carles Cufí
Browse files

drivers: susbsys: Check errors on devices selected using dt macro



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: default avatarErwan Gouriou <erwan.gouriou@linaro.org>
parent 8fbc83c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment