[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201209093103.20742-1-zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 17:31:03 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
CC: Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] mtd: rawnand: simplify the cs553x_write_ctrl_byte()
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
drivers/mtd/nand/raw/cs553x_nand.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/raw/cs553x_nand.c b/drivers/mtd/nand/raw/cs553x_nand.c
index 282203debd0c..a616aaa2e3dc 100644
--- a/drivers/mtd/nand/raw/cs553x_nand.c
+++ b/drivers/mtd/nand/raw/cs553x_nand.c
@@ -105,17 +105,12 @@ static int cs553x_write_ctrl_byte(struct cs553x_nand_controller *cs553x,
u32 ctl, u8 data)
{
u8 status;
- int ret;
writeb(ctl, cs553x->mmio + MM_NAND_CTL);
writeb(data, cs553x->mmio + MM_NAND_IO);
- ret = readb_poll_timeout_atomic(cs553x->mmio + MM_NAND_STS, status,
- !(status & CS_NAND_CTLR_BUSY), 1,
- 100000);
- if (ret)
- return ret;
-
- return 0;
+ return readb_poll_timeout_atomic(cs553x->mmio + MM_NAND_STS, status,
+ !(status & CS_NAND_CTLR_BUSY), 1,
+ 100000);
}
static void cs553x_data_in(struct cs553x_nand_controller *cs553x, void *buf,
--
2.22.0
Powered by blists - more mailing lists