diff options
author | Caleb Connolly <caleb.connolly@linaro.org> | 2024-03-05 14:55:13 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-13 18:47:11 -0400 |
commit | 7554388c1d10e3b44714cb8e4cbcc17f20141eec (patch) | |
tree | d6d003461ab05f2ee083dc056d5ec3b36a828f60 /arch/arm/lib/interrupts.c | |
parent | 421359ac52bfc80946929c4ffeacf6a68273e758 (diff) | |
download | u-boot-7554388c1d10e3b44714cb8e4cbcc17f20141eec.tar.gz u-boot-7554388c1d10e3b44714cb8e4cbcc17f20141eec.tar.bz2 u-boot-7554388c1d10e3b44714cb8e4cbcc17f20141eec.zip |
initcall: break loop immediately on failure
The current ordering always results in func pointing to the next
function in the init_sequence. e.g. if fdtdec_setup() fails, ret will
be set to the error code, then func will be updated to point to
initf_malloc(), only then is ret checked and the loop broken. The end
result of this is that the "initcall failed at ..." error will point you
to initf_malloc(), when the error actually occured in fdtdec_setup()!
This can be quite confusing and result in a lot of time wasted debugging
code that has nothing to do with the failure (ask me how I know :P).
Adjust the for loop to check ret immediately after the call and break
early so that func will correctly reference the failed function.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Diffstat (limited to 'arch/arm/lib/interrupts.c')
0 files changed, 0 insertions, 0 deletions