summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2020-07-24 10:38:25 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-09-30 16:44:16 +0200
commitd43511d05cd41c987c26a122c4c49cae382c5c99 (patch)
tree867279ec60a22e1b9a826b7bb35ab77eebecb7e6 /drivers/mtd
parentmtd: spinand: macronix: Add support for MX31UF1GE4BC (diff)
downloadlinux-d43511d05cd41c987c26a122c4c49cae382c5c99.tar.xz
linux-d43511d05cd41c987c26a122c4c49cae382c5c99.zip
mtd: rawnand: oxnas: cleanup/simplify code
Simplify oxnas_nand_probe. Signed-off-by: Pavel Machek (CIP) <pavel@denx.de> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200724083825.GA31437@amd
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/oxnas_nand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c
index 8d0d76ad319d..f44947043e5a 100644
--- a/drivers/mtd/nand/raw/oxnas_nand.c
+++ b/drivers/mtd/nand/raw/oxnas_nand.c
@@ -144,8 +144,7 @@ static int oxnas_nand_probe(struct platform_device *pdev)
if (err)
goto err_cleanup_nand;
- oxnas->chips[oxnas->nchips] = chip;
- ++oxnas->nchips;
+ oxnas->chips[oxnas->nchips++] = chip;
}
/* Exit if no chips found */