diff options
author | Brian Norris <computersforpeace@gmail.com> | 2012-06-22 16:35:43 -0700 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-07-06 18:17:08 +0100 |
commit | 718894ad94626b72403c21fab5ccdd982147e4c6 (patch) | |
tree | ca00bffc160092c2284680dded246c79b170127d /drivers/mtd | |
parent | 9fd6b37a08d49c5f9b108509fde8d618f74fb7ad (diff) | |
download | linux-718894ad94626b72403c21fab5ccdd982147e4c6.tar.gz linux-718894ad94626b72403c21fab5ccdd982147e4c6.tar.bz2 linux-718894ad94626b72403c21fab5ccdd982147e4c6.zip |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index dff24fa44cd2..3df8d92c5e08 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -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; } /** |