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:
parent
9fd6b37a08
commit
718894ad94
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue