@@ -101,11 +101,13 @@ void relocate_below_kernel(void)
101
101
*/
102
102
void main (UNUSED void * arg )
103
103
{
104
+ int ret ;
104
105
void * bootloader_dtb = NULL ;
105
106
106
107
/* initialize platform to a state where we can print to a UART */
107
- if (initialise_devices ()) {
108
- printf ("ERROR: Did not successfully return from initialise_devices()\n" );
108
+ ret = initialise_devices ();
109
+ if (0 != ret ) {
110
+ printf ("ERROR: device initialization failed (%d)\n" , ret );
109
111
abort ();
110
112
}
111
113
@@ -144,8 +146,8 @@ void main(UNUSED void *arg)
144
146
145
147
/* Unpack ELF images into memory. */
146
148
unsigned int num_apps = 0 ;
147
- int ret = load_images (& kernel_info , & user_info , 1 , & num_apps ,
148
- bootloader_dtb , & dtb , & dtb_size );
149
+ ret = load_images (& kernel_info , & user_info , 1 , & num_apps ,
150
+ bootloader_dtb , & dtb , & dtb_size );
149
151
if (0 != ret ) {
150
152
printf ("ERROR: image loading failed\n" );
151
153
abort ();
@@ -179,8 +181,9 @@ void continue_boot(int was_relocated)
179
181
* driver model so all its pointers are set up properly.
180
182
*/
181
183
if (was_relocated ) {
182
- if (initialise_devices ()) {
183
- printf ("ERROR: Did not successfully return from initialise_devices()\n" );
184
+ int ret = initialise_devices ();
185
+ if (0 != ret ) {
186
+ printf ("ERROR: device initialization failed (%d)\n" , ret );
184
187
abort ();
185
188
}
186
189
}
0 commit comments