initcall: Adjust the failure message and return value
Move the failure message outside the loop, so it is easier to follow the code. Avoid swallowing the error code - just pass it along. Drop the initcall-list address from the output. This is confusing since we show two addresses. Really it is only the function address which is useful, since it can be looked up in the map, e.g. with: grep -A1 -B1 serial_init u-boot.map Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -46,11 +46,13 @@ int initcall_run_list(const init_fnc_t init_sequence[])
|
||||
}
|
||||
|
||||
ret = func();
|
||||
if (ret) {
|
||||
printf("initcall sequence %p failed at call %p (err=%d)\n",
|
||||
init_sequence, (char *)func - reloc_ofs, ret);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
printf("initcall failed at call %p (err=%dE)\n",
|
||||
(char *)func - reloc_ofs, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user