summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
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) {