Browse Source

uboot_env: nand: fix return of devread

When the function devread read the environement
from a nand, the value returned is always 0. But,
the check on the value returned is done on the
environment size, so we return the size of data
read.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Acked-by: Stefano Babic <sbabic@denx.de>
pull/3/head
Philippe Reynes 5 years ago
committed by Stefano Babic
parent
commit
a1744ab6a0
  1. 2
      src/uboot_env.c

2
src/uboot_env.c

@ -274,8 +274,8 @@ static int devread(struct uboot_ctx *ctx, unsigned int copy, void *data)
start += dev->sectorsize;
data += blocksize;
count -= blocksize;
ret += blocksize;
}
ret = count;
break;
}

Loading…
Cancel
Save