Commit 4c5f69ae authored by ye xingchen's avatar ye xingchen Committed by Miquel Raynal
Browse files

mtd: rawnand: cadence: Remove an unneeded result variable



Return the value cadence_nand_set_access_width16() directly instead of
storing it in another redundant variable.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220901074555.313266-1-ye.xingchen@zte.com.cn
parent c26ef845
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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,