Commit 59186a40 authored by Samuel Holland's avatar Samuel Holland Committed by Miquel Raynal
Browse files

mtd: rawnand: sunxi: Remove an unnecessary check



sunxi_nand->nsels cannot be zero, so the second check implies the first.

Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-3-samuel@sholland.org
parent 6d7fea22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -421,7 +421,7 @@ static void sunxi_nfc_select_chip(struct nand_chip *nand, unsigned int cs)
	struct sunxi_nand_chip_sel *sel;
	u32 ctl;

	if (cs > 0 && cs >= sunxi_nand->nsels)
	if (cs >= sunxi_nand->nsels)
		return;

	ctl = readl(nfc->regs + NFC_REG_CTL) &