Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe JAILLET and committed by
David S. Miller
9a9acdcc 214b3369

+1
+1
drivers/net/ethernet/allwinner/sun4i-emac.c
··· 1072 1072 clk_disable_unprepare(db->clk); 1073 1073 out_dispose_mapping: 1074 1074 irq_dispose_mapping(ndev->irq); 1075 + dma_release_channel(db->rx_chan); 1075 1076 out_iounmap: 1076 1077 iounmap(db->membase); 1077 1078 out: