netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: sun4i-emac: Fix an error handling path in emac_probe()
@ 2022-01-15 12:45 Christophe JAILLET
  2022-01-15 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-01-15 12:45 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Maxime Ripard, Chen-Yu Tsai,
	Jernej Skrabec, Conley Lee
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev,
	linux-arm-kernel, linux-sunxi

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>
---
 drivers/net/ethernet/allwinner/sun4i-emac.c | 1 +
 1 file changed, 1 insertion(+)

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 @@ 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:
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ethernet: sun4i-emac: Fix an error handling path in emac_probe()
  2022-01-15 12:45 [PATCH] net: ethernet: sun4i-emac: Fix an error handling path in emac_probe() Christophe JAILLET
@ 2022-01-15 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-15 22:40 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: davem, kuba, mripard, wens, jernej.skrabec, conleylee,
	linux-kernel, kernel-janitors, netdev, linux-arm-kernel,
	linux-sunxi

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Sat, 15 Jan 2022 13:45:03 +0100 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - net: ethernet: sun4i-emac: Fix an error handling path in emac_probe()
    https://git.kernel.org/netdev/net/c/9a9acdccdfa4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-15 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-15 12:45 [PATCH] net: ethernet: sun4i-emac: Fix an error handling path in emac_probe() Christophe JAILLET
2022-01-15 22:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).