mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
mtd: rawnand: cadence: Fix return type of CDMA send-and-wait helper
cadence_nand_cdma_send_and_wait() propagates negative errno values
from cadence_nand_cdma_send(), returns -ETIMEDOUT on failure and -EIO
when the CDMA engine reports a command failure.
However, it is declared as u32, causing error codes to wrap.
Change the return type to int to correctly propagate errors.
Fixes: ec4ba01e89 ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
a75a1dec03
commit
6d8226cbbf
|
|
@ -1066,7 +1066,7 @@ static int cadence_nand_cdma_send(struct cdns_nand_ctrl *cdns_ctrl,
|
|||
}
|
||||
|
||||
/* Send SDMA command and wait for finish. */
|
||||
static u32
|
||||
static int
|
||||
cadence_nand_cdma_send_and_wait(struct cdns_nand_ctrl *cdns_ctrl,
|
||||
u8 thread)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user