mtd: rawnand: sunxi: Make sure ret is initialized in sunxi_nfc_read_byte()

Fixes the following smatch warning:

drivers/mtd/nand/raw/sunxi_nand.c:551 sunxi_nfc_read_byte() error: uninitialized symbol 'ret'.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
Boris Brezillon 2018-07-09 22:09:32 +02:00 committed by Miquel Raynal
parent cf3e3fd2e9
commit 06c8b5dc93
1 changed files with 1 additions and 1 deletions

View File

@ -544,7 +544,7 @@ static void sunxi_nfc_write_buf(struct mtd_info *mtd, const uint8_t *buf,
static uint8_t sunxi_nfc_read_byte(struct mtd_info *mtd) static uint8_t sunxi_nfc_read_byte(struct mtd_info *mtd)
{ {
uint8_t ret; uint8_t ret = 0;
sunxi_nfc_read_buf(mtd, &ret, 1); sunxi_nfc_read_buf(mtd, &ret, 1);