Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 718894ad authored by Brian Norris's avatar Brian Norris Committed by David Woodhouse
Browse files

mtd: nand_bbt: refactor check_pattern_no_oob()



This function only returns 0 or -1, so make that clear.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 9fd6b37a
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -71,12 +71,9 @@

static int check_pattern_no_oob(uint8_t *buf, struct nand_bbt_descr *td)
{
	int ret;

	ret = memcmp(buf, td->pattern, td->len);
	if (!ret)
		return ret;
	if (memcmp(buf, td->pattern, td->len))
		return -1;
	return 0;
}

/**