Skip to contentSkip to conversation

mtd: rawnand: ndfc: fix gcc uninitialized var

PATCH Applied Rosen Penev 2 participants 2 messages Jun 14 – Jun 29

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

PATCH 1/1 mtd: rawnand: ndfc: fix gcc uninitialized var

Now that this can be built with COMPILE_TEST, an unassigned variable was found. Set to 0 to fix the W=1 error under GCC.

---
 drivers/mtd/nand/raw/ndfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/ndfc.c +1 -1
index a937ca3eeff5..a48274297d3b 100644
@@ -188,7 +188,7 @@ static int ndfc_probe(struct platform_device *ofdev)
 	const __be32 *reg;
 	u32 ccr;
 	u32 cs;
-	int err, len;
+	int err, len = 0;
 
 	/* Read the reg property to get the chip select */
 	reg = of_get_property(ofdev->dev.of_node, "reg", &len);
Signature · 1 line
2.54.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Rosen Penev

Now that this can be built with COMPILE_TEST, an unassigned variable was found. Set to 0 to fix the W=1 error under GCC.

Applied to mtd/fixes, thanks!

[1/1] mtd: rawnand: ndfc: fix gcc uninitialized var

      commit: cceca8cb776b03e83985578f84bd730c30d57f70

Patche(s) should be available on mtd/linux.git and will be part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl