ipq: Flash command code cleanup

Change-Id: I54b8677cba4b8a63b245bde8f1840d146d6694ee
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
This commit is contained in:
Pavithra Palanisamy 2019-05-28 16:19:55 +05:30
parent b858c4fdae
commit 42a29e7793

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