Skip to content

Commit c96f824

Browse files
Minghao Chimiquelraynal
authored andcommitted
mtd: rawnand: cs553x: simplify the return expression of cs553x_write_ctrl_byte()
Simplify the return expression. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220505022354.61458-1-chi.minghao@zte.com.cn
1 parent 7738981 commit c96f824

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/mtd/nand/raw/cs553x_nand.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,12 @@ static int cs553x_write_ctrl_byte(struct cs553x_nand_controller *cs553x,
104104
u32 ctl, u8 data)
105105
{
106106
u8 status;
107-
int ret;
108107

109108
writeb(ctl, cs553x->mmio + MM_NAND_CTL);
110109
writeb(data, cs553x->mmio + MM_NAND_IO);
111-
ret = readb_poll_timeout_atomic(cs553x->mmio + MM_NAND_STS, status,
110+
return readb_poll_timeout_atomic(cs553x->mmio + MM_NAND_STS, status,
112111
!(status & CS_NAND_CTLR_BUSY), 1,
113112
100000);
114-
if (ret)
115-
return ret;
116-
117-
return 0;
118113
}
119114

120115
static void cs553x_data_in(struct cs553x_nand_controller *cs553x, void *buf,

0 commit comments

Comments
 (0)