mtd: nand_bbt: refactor check_pattern_no_oob()

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

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Brian Norris 2012-06-22 16:35:43 -07:00 committed by David Woodhouse
parent 9fd6b37a08
commit 718894ad94
1 changed files with 3 additions and 6 deletions

View File

@ -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;
}
/**