From: Artem Bityutskiy Date: Mon, 8 Sep 2014 12:05:54 +0000 (+0300) Subject: ubiformat: fix the subpage size hint on the error path X-Git-Tag: v1.5.2~21 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=15685fe39f1665d53d8b316c8f837f20f8700d4b;p=mtd-utils.git ubiformat: fix the subpage size hint on the error path David Binderman 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 --- diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c index 1b8f6fb..21409ca 100644 --- a/ubi-utils/ubiformat.c +++ b/ubi-utils/ubiformat.c @@ -633,9 +633,8 @@ static int format(libmtd_t libmtd, 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; }