aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-04-18 10:31:39 -0400
committerTom Rini <trini@konsulko.com>2017-04-18 10:31:39 -0400
commitf83845829aed451d86207f46cd956f3210bd2591 (patch)
treec1f132dbd2368b130f9f8ef88c64ed754f00f944 /cmd
parent54f302f1197a490c2c4e3564c698ecd090d5013b (diff)
parent18f41f2fa2d021f7baad37ba6fbe01b49309afbb (diff)
downloadu-boot-f83845829aed451d86207f46cd956f3210bd2591.zip
u-boot-f83845829aed451d86207f46cd956f3210bd2591.tar.gz
u-boot-f83845829aed451d86207f46cd956f3210bd2591.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-ubi
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ubi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/ubi.c b/cmd/ubi.c
index efc43ff..222be5a 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -308,7 +308,7 @@ int ubi_volume_begin_write(char *volume, void *buf, size_t size,
return ENODEV;
rsvd_bytes = vol->reserved_pebs * (ubi->leb_size - vol->data_pad);
- if (size < 0 || size > rsvd_bytes) {
+ if (size > rsvd_bytes) {
printf("size > volume size! Aborting!\n");
return EINVAL;
}