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

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
......@@ -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;
return -1;
if (memcmp(buf, td->pattern, td->len))
return -1;
return 0;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment