mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
mtd: spinand: initialize ret in regular page reads
spinand_mtd_regular_page_read() returns ret after iterating over the requested pages. If the request contains no data or OOB bytes, the iterator does not run and ret is not assigned. Initialize it to 0 for the empty request path. Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
4b45d7836b
commit
5d7a08125e
|
|
@ -822,7 +822,7 @@ static int spinand_mtd_regular_page_read(struct mtd_info *mtd, loff_t from,
|
|||
bool disable_ecc = false;
|
||||
bool ecc_failed = false;
|
||||
unsigned int retry_mode = 0;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
old_stats = mtd->ecc_stats;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user