[PATCH] mtd: rawnand: oxnas: cleanup/simplify code
Neil Armstrong
narmstrong at baylibre.com
Fri Jul 24 06:01:53 EDT 2020
On 24/07/2020 10:38, Pavel Machek wrote:
> Simplify oxnas_nand_probe.
>
> Signed-off-by: Pavel Machek (CIP) <pavel at denx.de>
>
> 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 */
>
Acked-by: Neil Armstrong <narmstrong at baylibre.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20200724/c3936a54/attachment-0001.sig>
More information about the linux-mtd
mailing list