mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
dmaengine: mv_xor: Fix a missing check in mv_xor_channel_add
dma_async_device_register() may fail and return an error. The capabilities checked in mv_xor_channel_add() are not complete. The fix handles the error by freeing the resources. Signed-off-by: Aditya Pakki <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
bfeffd1552
commit
7c97381e7a
1 changed files with 4 additions and 1 deletions
|
|
@ -1153,7 +1153,10 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
|||
dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
|
||||
dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
|
||||
|
||||
dma_async_device_register(dma_dev);
|
||||
ret = dma_async_device_register(dma_dev);
|
||||
if (ret)
|
||||
goto err_free_irq;
|
||||
|
||||
return mv_chan;
|
||||
|
||||
err_free_irq:
|
||||
|
|
|
|||
Loading…
Reference in a new issue