dmaengine: mv_xor: Fix a missing check in mv_xor_channel_add
authorAditya Pakki <pakki001@umn.edu>
Mon, 24 Dec 2018 17:41:54 +0000 (11:41 -0600)
committerVinod Koul <vkoul@kernel.org>
Mon, 7 Jan 2019 04:20:29 +0000 (09:50 +0530)
commit7992d6a5c8ba65dc01ae38e1c9042d8f5186c058
treed53a0efb6f3693bf8d8168dcfc706f822caeb8ae
parentf9bb4b753eb00c02014e4467a28609f4f6ac7f88
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 <pakki001@umn.edu>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/mv_xor.c