summaryrefslogtreecommitdiffstats
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
parent75b049bb7f89a58a25592f17baf91d703f0f548e (diff)
downloadlinux-stable-d43511d05cd41c987c26a122c4c49cae382c5c99.tar.gz
linux-stable-d43511d05cd41c987c26a122c4c49cae382c5c99.tar.bz2
linux-stable-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
-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 */