
Dear Giuseppe CONDORELLI,
In message 011301ca2c7a$b5d83c40$c08182a4@st.com you wrote:
What happens when we return here? Obviously this function is supposed to never return. Should we call hang() here?
Given that z_error is invoked by Assert macro (never used) and that "exit" function (other than closing all opened stream) will terminate program execution, I suggest to remove it without adding others instructions letting u-boot to hang by itself (if it will do this).
Well, if you just return from z_error() after an error condition was detected, and continue to run, this will cause undefined behaviour. I prefer to have a clear error condition which halts the system, instead of having a system which continues to run but does random things on me, eventually causing bigger damages.
Best regards,
Wolfgang Denk