summaryrefslogtreecommitdiffstats
path: root/commands/ubiformat.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-12-09 08:35:45 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-12-10 11:04:40 +0100
commitce4dc6df3bcbce61e8e4616cde2eaf947e32f012 (patch)
tree889a88d616483beb89a2127aafe707a1758d159f /commands/ubiformat.c
parentd37f1284dee584ff28439f90f9275e44e4ad5535 (diff)
downloadbarebox-ce4dc6df3bcbce61e8e4616cde2eaf947e32f012.tar.gz
barebox-ce4dc6df3bcbce61e8e4616cde2eaf947e32f012.tar.xz
ubiformat: fix the subpage size hint on the error path
From mtd-utils commit: | commit 15685fe39f1665d53d8b316c8f837f20f8700d4b | Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | Date: Mon Sep 8 15:05:54 2014 +0300 | | ubiformat: fix the subpage size hint on the error path | | David Binderman <dcb314@hotmail.com> reports that the following piece of looks | wrong: | | if (!args.subpage_size != mtd->min_io_size) | normsg("may be sub-page size is incorrect?"); | | I totally agree with him and I believe that we actually meant to have no | negation in fron to f 'args.subpage_size', so instead, the code should look | like this: | | if (args.subpage_size != mtd->min_io_size) | normsg("may be sub-page size is incorrect?"); | | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/ubiformat.c')
-rw-r--r--commands/ubiformat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/commands/ubiformat.c b/commands/ubiformat.c
index 8516e112c3..f9c50b7936 100644
--- a/commands/ubiformat.c
+++ b/commands/ubiformat.c
@@ -503,9 +503,8 @@ static int format(const struct mtd_dev_info *mtd,
write_size, eb);
if (errno != EIO) {
- if (!args.subpage_size != mtd->min_io_size)
- normsg("may be sub-page size is "
- "incorrect?");
+ if (args.subpage_size != mtd->min_io_size)
+ normsg("may be sub-page size is incorrect?");
goto out_free;
}