Merge "ipq: Flash command code cleanup"

This commit is contained in:
Linux Build Service Account 2019-05-28 09:35:28 -07:00 committed by Gerrit - the friendly Code Review server
commit 3fa6b1cda1

View file

@ -271,11 +271,6 @@ char * const argv[])
if (flash_cmd) {
if (file_size > part_size) {
printf("Image size is greater than partition memory\n");
return CMD_RET_FAILURE;
}
if (flash_type == SMEM_BOOT_NAND_FLASH) {
adj_size = file_size % nand->writesize;
@ -293,6 +288,11 @@ char * const argv[])
}
}
if (file_size > part_size) {
printf("Image size is greater than partition memory\n");
return CMD_RET_FAILURE;
}
ret = write_to_flash(flash_type, load_addr, offset, part_size,
file_size, layout);
} else