Commit 9a9acdcc authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

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: 47869e82 ("sun4i-emac.c: add dma support")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 214b3369
......@@ -1072,6 +1072,7 @@ static int emac_probe(struct platform_device *pdev)
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:
......
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