mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 16:40:22 +00:00
mtd: rawnand: intel: Fix an error handling path in 'ebu_dma_start()'
If 'dmaengine_prep_slave_single()' fails, we must undo a previous 'dma_map_single()' call, as already done in all the other error handling paths of this function. Fixes: 0b1039f016e8 ("mtd: rawnand: Add NAND controller support on Intel LGM SoC") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210124073955.728797-1-christophe.jaillet@wanadoo.fr
This commit is contained in:
parent
94d07f6a53
commit
073abfa7ea
@ -318,8 +318,10 @@ static int ebu_dma_start(struct ebu_nand_controller *ebu_host, u32 dir,
|
||||
}
|
||||
|
||||
tx = dmaengine_prep_slave_single(chan, buf_dma, len, dir, flags);
|
||||
if (!tx)
|
||||
return -ENXIO;
|
||||
if (!tx) {
|
||||
ret = -ENXIO;
|
||||
goto err_unmap;
|
||||
}
|
||||
|
||||
tx->callback = callback;
|
||||
tx->callback_param = ebu_host;
|
||||
|
Loading…
x
Reference in New Issue
Block a user