提交 3918f6ba 编写于 作者: A Aditya Pakki 提交者: Yang Yingliang

rocker: fix incorrect error handling in dma_rings_init

[ Upstream commit 58d0c864 ]

In rocker_dma_rings_init, the goto blocks in case of errors
caused by the functions rocker_dma_cmd_ring_waits_alloc() and
rocker_dma_ring_create() are incorrect. The patch fixes the
order consistent with cleanup in rocker_dma_rings_fini().
Signed-off-by: NAditya Pakki <pakki001@umn.edu>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a119d858
...@@ -651,10 +651,10 @@ static int rocker_dma_rings_init(struct rocker *rocker) ...@@ -651,10 +651,10 @@ static int rocker_dma_rings_init(struct rocker *rocker)
err_dma_event_ring_bufs_alloc: err_dma_event_ring_bufs_alloc:
rocker_dma_ring_destroy(rocker, &rocker->event_ring); rocker_dma_ring_destroy(rocker, &rocker->event_ring);
err_dma_event_ring_create: err_dma_event_ring_create:
rocker_dma_cmd_ring_waits_free(rocker);
err_dma_cmd_ring_waits_alloc:
rocker_dma_ring_bufs_free(rocker, &rocker->cmd_ring, rocker_dma_ring_bufs_free(rocker, &rocker->cmd_ring,
PCI_DMA_BIDIRECTIONAL); PCI_DMA_BIDIRECTIONAL);
err_dma_cmd_ring_waits_alloc:
rocker_dma_cmd_ring_waits_free(rocker);
err_dma_cmd_ring_bufs_alloc: err_dma_cmd_ring_bufs_alloc:
rocker_dma_ring_destroy(rocker, &rocker->cmd_ring); rocker_dma_ring_destroy(rocker, &rocker->cmd_ring);
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册