Commit a577659f authored by Sachin Kamat's avatar Sachin Kamat Committed by Dan Williams

dma: mv_xor: Fix incorrect error path

Return directly if memory allocation fails. There is no need
of dma_free_coherent().
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: Saeed Bishara <saeed@marvell.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent e6a5fa63
...@@ -1036,10 +1036,8 @@ mv_xor_channel_add(struct mv_xor_device *xordev, ...@@ -1036,10 +1036,8 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
struct dma_device *dma_dev; struct dma_device *dma_dev;
mv_chan = devm_kzalloc(&pdev->dev, sizeof(*mv_chan), GFP_KERNEL); mv_chan = devm_kzalloc(&pdev->dev, sizeof(*mv_chan), GFP_KERNEL);
if (!mv_chan) { if (!mv_chan)
ret = -ENOMEM; return ERR_PTR(-ENOMEM);
goto err_free_dma;
}
mv_chan->idx = idx; mv_chan->idx = idx;
mv_chan->irq = irq; mv_chan->irq = irq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment