diff options
author | Aditya Pakki <pakki001@umn.edu> | 2020-06-12 15:27:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-15 13:37:36 -0700 |
commit | 58d0c864e1a759a15c9df78f50ea5a5c32b3989e (patch) | |
tree | 6bf7d2ee5c8908977d663e82833ad2cb1fd872f4 /drivers/net/ethernet/rocker | |
parent | a6379f0ad6375a707e915518ecd5c2270afcd395 (diff) | |
download | lwn-58d0c864e1a759a15c9df78f50ea5a5c32b3989e.tar.gz lwn-58d0c864e1a759a15c9df78f50ea5a5c32b3989e.zip |
rocker: fix incorrect error handling in dma_rings_init
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: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/rocker')
-rw-r--r-- | drivers/net/ethernet/rocker/rocker_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c index 7585cd2270ba..fc99e7118e49 100644 --- a/drivers/net/ethernet/rocker/rocker_main.c +++ b/drivers/net/ethernet/rocker/rocker_main.c @@ -647,10 +647,10 @@ static int rocker_dma_rings_init(struct rocker *rocker) err_dma_event_ring_bufs_alloc: rocker_dma_ring_destroy(rocker, &rocker->event_ring); 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, PCI_DMA_BIDIRECTIONAL); -err_dma_cmd_ring_waits_alloc: - rocker_dma_cmd_ring_waits_free(rocker); err_dma_cmd_ring_bufs_alloc: rocker_dma_ring_destroy(rocker, &rocker->cmd_ring); return err; |