From: Pavel Machek Date: Fri, 24 Jul 2020 08:38:25 +0000 (+0200) Subject: mtd: rawnand: oxnas: cleanup/simplify code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=552a028f6d3a7f2755048dd30dd7b15fcda2b958;p=linux.git mtd: rawnand: oxnas: cleanup/simplify code Simplify oxnas_nand_probe. Signed-off-by: Pavel Machek (CIP) Acked-by: Neil Armstrong Signed-off-by: Jiri Kosina --- diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c index 8d0d76ad319d3..f44947043e5a2 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 */