mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-25 19:07:46 +00:00
mtd: nand: cs553x: return error code of nand_scan() on error
The nand_scan() returns an appropriate error value when it fails. Use it instead of the fixed error code -ENXIO. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
parent
546fe03fe3
commit
29453ba40b
@ -242,10 +242,9 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
|
||||
}
|
||||
|
||||
/* Scan to find existence of the device */
|
||||
if (nand_scan(new_mtd, 1)) {
|
||||
err = -ENXIO;
|
||||
err = nand_scan(new_mtd, 1);
|
||||
if (err)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
cs553x_mtd[cs] = new_mtd;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user