[PATCH 1/2] mtd: nand: Fix compiler warning
Alexander Shiyan
shc_work at mail.ru
Tue Mar 5 10:09:01 EST 2013
This patch fixes following warning:
drivers/mtd/nand/nand_write.c: In function 'nand_do_write_ops':
drivers/mtd/nand/nand_write.c:272: warning: 'ret' may be used uninitialized in this function
Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
drivers/mtd/nand/nand_write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_write.c
index eea5113..0e2f98f 100644
--- a/drivers/mtd/nand/nand_write.c
+++ b/drivers/mtd/nand/nand_write.c
@@ -269,7 +269,7 @@ int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
uint32_t writelen = ops->len;
uint8_t *oob = ops->oobbuf;
uint8_t *buf = ops->datbuf;
- int ret, subpage;
+ int ret = 0, subpage;
ops->retlen = 0;
if (!writelen)
--
1.7.12.4
More information about the barebox
mailing list