summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-08-18 21:19:00 +0200
committerWolfgang Denk <wd@denx.de>2010-08-18 21:19:00 +0200
commit5549d22b656550d36b2cc46743c7220ab0e9dcc4 (patch)
treeacc88f5980b8ca5999e05e9a86429e5b397cdd7e /common
parentae37a0704a8a27e47471f541a68b88370cd14aa8 (diff)
parent9ce2c4b7f79c5bdc1697a6979a0d33e51c3cf57d (diff)
downloadu-boot-imx-5549d22b656550d36b2cc46743c7220ab0e9dcc4.zip
u-boot-imx-5549d22b656550d36b2cc46743c7220ab0e9dcc4.tar.gz
u-boot-imx-5549d22b656550d36b2cc46743c7220ab0e9dcc4.tar.bz2
Merge branch 'master' of /home/wd/git/u-boot/master
Diffstat (limited to 'common')
-rw-r--r--common/cmd_usb.c2
-rw-r--r--common/env_nand.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index dc63f24..226ea0d 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -712,7 +712,7 @@ U_BOOT_CMD(
"usb part [dev] - print partition table of one or all USB storage"
" devices\n"
"usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n"
- " to memory address `addr'"
+ " to memory address `addr'\n"
"usb write addr blk# cnt - write `cnt' blocks starting at block `blk#'\n"
" from memory address `addr'"
);
diff --git a/common/env_nand.c b/common/env_nand.c
index a5e1038..d38bcca 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -266,6 +266,8 @@ int readenv (size_t offset, u_char * buf)
u_char *char_ptr;
blocksize = nand_info[0].erasesize;
+ if (!blocksize)
+ return 1;
len = min(blocksize, CONFIG_ENV_SIZE);
while (amount_loaded < CONFIG_ENV_SIZE && offset < end) {