summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/allwinner
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-01-15 15:45:03 +0300
committerDavid S. Miller <davem@davemloft.net>2022-01-16 01:34:52 +0300
commit9a9acdccdfa430457986db608ee4ae4840107057 (patch)
tree573bdba837571c0f4f07833025213be8b686c066 /drivers/net/ethernet/allwinner
parent214b3369ab9b0a6f28d6c970220c209417edbc65 (diff)
downloadlinux-9a9acdccdfa430457986db608ee4ae4840107057.tar.xz
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: 47869e82c8b8 ("sun4i-emac.c: add dma support") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/allwinner')
-rw-r--r--drivers/net/ethernet/allwinner/sun4i-emac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
index 74635a6fa8ca..621ce742ad21 100644
--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
@@ -1072,6 +1072,7 @@ out_clk_disable_unprepare:
clk_disable_unprepare(db->clk);
out_dispose_mapping:
irq_dispose_mapping(ndev->irq);
+ dma_release_channel(db->rx_chan);
out_iounmap:
iounmap(db->membase);
out: