net: ethernet: sun4i-emac: Fix an error handling path in emac_probe()

A dma_request_chan() call is hidden in emac_configure_dma().
It must be released in the probe if an error occurs, as already done in
the remove function.

Add the corresponding dma_release_channel() call.

Fixes: 47869e82c8 ("sun4i-emac.c: add dma support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christophe JAILLET 2022-01-15 13:45:03 +01:00 committed by David S. Miller
parent 214b3369ab
commit 9a9acdccdf
1 changed files with 1 additions and 0 deletions

View File

@ -1072,6 +1072,7 @@ out_clk_disable_unprepare:
clk_disable_unprepare(db->clk); clk_disable_unprepare(db->clk);
out_dispose_mapping: out_dispose_mapping:
irq_dispose_mapping(ndev->irq); irq_dispose_mapping(ndev->irq);
dma_release_channel(db->rx_chan);
out_iounmap: out_iounmap:
iounmap(db->membase); iounmap(db->membase);
out: out: