[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220901074555.313266-1-ye.xingchen@zte.com.cn>
Date: Thu, 1 Sep 2022 07:45:54 +0000
From: cgel.zte@...il.com
To: miquel.raynal@...tlin.com
Cc: richard@....at, vigneshr@...com, yangyingliang@...wei.com,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] mtd: rawnand: Remove the unneeded result variable
From: ye xingchen <ye.xingchen@....com.cn>
Return the value cadence_nand_set_access_width16() directly instead of
storing it in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
drivers/mtd/nand/raw/cadence-nand-controller.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 0d72672f8b64..9dac3ca69d57 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -1979,7 +1979,6 @@ static int cadence_nand_force_byte_access(struct nand_chip *chip,
bool force_8bit)
{
struct cdns_nand_ctrl *cdns_ctrl = to_cdns_nand_ctrl(chip->controller);
- int status;
/*
* Callers of this function do not verify if the NAND is using a 16-bit
@@ -1990,9 +1989,7 @@ static int cadence_nand_force_byte_access(struct nand_chip *chip,
if (!(chip->options & NAND_BUSWIDTH_16))
return 0;
- status = cadence_nand_set_access_width16(cdns_ctrl, !force_8bit);
-
- return status;
+ return cadence_nand_set_access_width16(cdns_ctrl, !force_8bit);
}
static int cadence_nand_cmd_opcode(struct nand_chip *chip,
--
2.25.1
Powered by blists - more mailing lists