Skip to contentSkip to conversation

mtd: rawnand: oxnas: cleanup/simplify code

PATCH Applied Pavel Machek 3 participants 3 messages Jul 24, 2020 – Sep 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: rawnand: oxnas: cleanup/simplify code

Simplify oxnas_nand_probe.

drivers/mtd/nand/raw/oxnas_nand.c +1 -2
index 8d0d76ad319d..f44947043e5a 100644
@@ -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 */
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Pavel Machek

Simplify oxnas_nand_probe.

drivers/mtd/nand/raw/oxnas_nand.c +0 -0
index 8d0d76ad319d..f44947043e5a 100644

drivers/mtd/nand/raw/oxnas_nand.c static int oxnas_nand_probe(struct platform_device *pdev) · line 150

Quoted 9 lines
drivers/mtd/nand/raw/oxnas_nand.c +1 -2
@@ -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 */