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>
This commit is contained in:
parent
7b46b5e850
commit
3104fae244
|
@ -506,9 +506,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue