diff options
author | Samuel Holland <samuel@sholland.org> | 2022-12-29 12:15:21 -0600 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-01-02 12:14:21 +0100 |
commit | 59186a402ab07d205428ee9f62ff0e95ecb06b63 (patch) | |
tree | c5f42b93af496e6465d9b05d58e0193f2b861ef4 /drivers/mtd/nand | |
parent | 6d7fea226b238b95d69faba49b8faf73d6e8c469 (diff) |
mtd: rawnand: sunxi: Remove an unnecessary check
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
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/raw/sunxi_nand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 2ee86f7b0905..8b221f9f10a7 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -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) & |