All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: oxnas: cleanup/simplify code
@ 2020-07-24  8:38 ` Pavel Machek
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Machek @ 2020-07-24  8:38 UTC (permalink / raw)
  To: trivial, miquel.raynal, richard, vigneshr, narmstrong,
	nishkadg.linux, linux-mtd, linux-arm-kernel, linux-oxnas,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Simplify oxnas_nand_probe.

Signed-off-by: Pavel Machek (CIP) <pavel@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 */

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-07  7:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24  8:38 [PATCH] mtd: rawnand: oxnas: cleanup/simplify code Pavel Machek
2020-07-24  8:38 ` Pavel Machek
2020-07-24  8:38 ` Pavel Machek
2020-07-24 10:01 ` Neil Armstrong
2020-07-24 10:01   ` Neil Armstrong
2020-07-24 10:01   ` Neil Armstrong
2020-09-07  7:22 ` Miquel Raynal
2020-09-07  7:22   ` Miquel Raynal
2020-09-07  7:22   ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.