mtd: rawnand: sunxi: Remove an unnecessary check
authorSamuel Holland <samuel@sholland.org>
Thu, 29 Dec 2022 18:15:21 +0000 (12:15 -0600)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 2 Jan 2023 11:14:21 +0000 (12:14 +0100)
sunxi_nand->nsels cannot be zero, so the second check implies the first.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-3-samuel@sholland.org
drivers/mtd/nand/raw/sunxi_nand.c

index 2ee86f7b0905e545aaf9f1de9cd4f9bb042162a5..8b221f9f10a751682280143647885271df0110f1 100644 (file)
@@ -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) &