提交 718894ad 编写于 作者: B Brian Norris 提交者: David Woodhouse

mtd: nand_bbt: refactor check_pattern_no_oob()

This function only returns 0 or -1, so make that clear.
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册