summaryrefslogtreecommitdiff
path: root/cmd/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/read.c')
-rw-r--r--cmd/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/read.c b/cmd/read.c
index ecf925426f..82c2d9ad99 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -66,7 +66,7 @@ int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
}
- if (blk_dread(dev_desc, offset + blk, cnt, addr) < 0) {
+ if (blk_dread(dev_desc, offset + blk, cnt, addr) != cnt) {
printf("Error reading blocks\n");
return 1;
}