aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorPavel Machek2020-07-24 10:38:25 +0200
committerJiri Kosina2020-09-01 14:31:36 +0200
commit552a028f6d3a7f2755048dd30dd7b15fcda2b958 (patch)
treeb0df6e5a127e0e6f3d0546a6a0d85e8297224567 /drivers/mtd
parentcae1d5a2c5a491141faa747e9944ba40ab4ab786 (diff)
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: Jiri Kosina <jkosina@suse.cz>
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 */