Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Liu Shixin and committed by
Miquel Raynal
88e315d1 fb1c7e82

+2 -7
+2 -7
drivers/mtd/nand/onenand/onenand_base.c
··· 1052 1052 int thislen) 1053 1053 { 1054 1054 struct onenand_chip *this = mtd->priv; 1055 - int ret; 1056 1055 1057 1056 this->read_bufferram(mtd, ONENAND_SPARERAM, this->oob_buf, 0, 1058 1057 mtd->oobsize); 1059 - ret = mtd_ooblayout_get_databytes(mtd, buf, this->oob_buf, 1060 - column, thislen); 1061 - if (ret) 1062 - return ret; 1063 - 1064 - return 0; 1058 + return mtd_ooblayout_get_databytes(mtd, buf, this->oob_buf, 1059 + column, thislen); 1065 1060 } 1066 1061 1067 1062 /**