main: Fix loading kernel & initfs images
This commit is contained in:
1 parent
7dd8fdb560
commit
3480526cde
1 file changed
+4
-4
+4
-4
@@ -1037,9 +1037,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
/* load */
|
||||
if ( dev_load ) {
|
||||
ret = 0;
|
||||
|
||||
if ( image_kernel )
|
||||
if ( image_kernel ) {
|
||||
ret = dev_load_image(dev, image_kernel->image);
|
||||
if ( ret < 0 )
|
||||
goto again;
|
||||
@@ -1049,8 +1047,9 @@ int main(int argc, char **argv) {
|
||||
image_list_unlink(image_kernel);
|
||||
free(image_kernel);
|
||||
image_kernel = NULL;
|
||||
}
|
||||
|
||||
if ( image_initfs )
|
||||
if ( image_initfs ) {
|
||||
ret = dev_load_image(dev, image_initfs->image);
|
||||
if ( ret < 0 )
|
||||
goto again;
|
||||
@@ -1061,6 +1060,7 @@ int main(int argc, char **argv) {
|
||||
free(image_initfs);
|
||||
image_initfs = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* flash */
|
||||
if ( dev_flash ) {
|
||||
|
||||
Reference in new issue
Block a user