Skip to content

Commit

Permalink
mtd: onenand: simplify the return expression of onenand_transfer_auto…
Browse files Browse the repository at this point in the history
…_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
  • Loading branch information
Liu Shixin authored and Miquel Raynal committed Sep 30, 2020
1 parent fb1c7e8 commit 88e315d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/mtd/nand/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 88e315d

Please sign in to comment.