mtd: onenand: simplify the return expression of onenand_transfer_auto_oob
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200921082441.2591669-1-liushixin2@huawei.com
This commit is contained in:
parent
fb1c7e8292
commit
88e315d12f
|
@ -1052,16 +1052,11 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col
|
|||
int thislen)
|
||||
{
|
||||
struct onenand_chip *this = mtd->priv;
|
||||
int ret;
|
||||
|
||||
this->read_bufferram(mtd, ONENAND_SPARERAM, this->oob_buf, 0,
|
||||
mtd->oobsize);
|
||||
ret = mtd_ooblayout_get_databytes(mtd, buf, this->oob_buf,
|
||||
column, thislen);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return mtd_ooblayout_get_databytes(mtd, buf, this->oob_buf,
|
||||
column, thislen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user