summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-21 10:24:41 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-09-30 16:44:17 +0200
commit88e315d12fbb50c0bd12549bb04a051a4b4bc744 (patch)
treef19928f6600ef000badf892fc827fe6db2140391 /drivers/mtd
parentmtd: rawnand: cadence: remove a redundant dev_err call (diff)
downloadlinux-88e315d12fbb50c0bd12549bb04a051a4b4bc744.tar.xz
linux-88e315d12fbb50c0bd12549bb04a051a4b4bc744.zip
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
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/onenand/onenand_base.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mtd/nand/onenand/onenand_base.c b/drivers/mtd/nand/onenand/onenand_base.c
index ec18ade33262..188b8061e1f7 100644
--- a/drivers/mtd/nand/onenand/onenand_base.c
+++ b/drivers/mtd/nand/onenand/onenand_base.c
@@ -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);
}
/**