mtd: rawnand: oxnas: cleanup/simplify code
authorPavel Machek <pavel@ucw.cz>
Fri, 24 Jul 2020 08:38:25 +0000 (10:38 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 1 Sep 2020 12:31:36 +0000 (14:31 +0200)
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>
drivers/mtd/nand/raw/oxnas_nand.c

index 8d0d76a..f449470 100644 (file)
@@ -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 */