mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
dfu:usb:fix: Read the "filesize" environment variable only when file read
The "filesize" environment variable shall be read only when relevant file is read. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
43e6627259
commit
81c1d7b605
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ static int mmc_file_op(enum dfu_mmc_op op, struct dfu_entity *dfu,
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (dfu->layout != DFU_RAW_ADDR) {
|
||||
if (dfu->layout != DFU_RAW_ADDR && op == DFU_OP_READ) {
|
||||
str_env = getenv("filesize");
|
||||
if (str_env == NULL) {
|
||||
puts("dfu: Wrong file size!\n");
|
||||
|
|
Loading…
Reference in a new issue