* [PATCH net] ethernet: tundra: free irq when alloc ring failed in tsi108_open()
@ 2022-11-09 4:40 Zhengchao Shao
2022-11-10 14:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Zhengchao Shao @ 2022-11-09 4:40 UTC (permalink / raw)
To: netdev, davem, edumazet, kuba, pabeni
Cc: u.kleine-koenig, mkl, tie-fei.zang, akpm, Alexandre.Bounine, jeff,
weiyongjun1, yuehaibing, shaozhengchao
When alloc tx/rx ring failed in tsi108_open(), it doesn't free irq. Fix
it.
Fixes: 5e123b844a1c ("[PATCH] Add tsi108/9 On Chip Ethernet device driver support")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
v2: move free_irq to error handling path and modify fixes tag
---
drivers/net/ethernet/tundra/tsi108_eth.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
index 2cd2afc3fff0..d09d352e1c0a 100644
--- a/drivers/net/ethernet/tundra/tsi108_eth.c
+++ b/drivers/net/ethernet/tundra/tsi108_eth.c
@@ -1290,12 +1290,15 @@ static int tsi108_open(struct net_device *dev)
data->rxring = dma_alloc_coherent(&data->pdev->dev, rxring_size,
&data->rxdma, GFP_KERNEL);
- if (!data->rxring)
+ if (!data->rxring) {
+ free_irq(data->irq_num, dev);
return -ENOMEM;
+ }
data->txring = dma_alloc_coherent(&data->pdev->dev, txring_size,
&data->txdma, GFP_KERNEL);
if (!data->txring) {
+ free_irq(data->irq_num, dev);
dma_free_coherent(&data->pdev->dev, rxring_size, data->rxring,
data->rxdma);
return -ENOMEM;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ethernet: tundra: free irq when alloc ring failed in tsi108_open()
2022-11-09 4:40 [PATCH net] ethernet: tundra: free irq when alloc ring failed in tsi108_open() Zhengchao Shao
@ 2022-11-10 14:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-10 14:50 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, davem, edumazet, kuba, pabeni, u.kleine-koenig, mkl,
tie-fei.zang, akpm, Alexandre.Bounine, jeff, weiyongjun1,
yuehaibing
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 9 Nov 2022 12:40:16 +0800 you wrote:
> When alloc tx/rx ring failed in tsi108_open(), it doesn't free irq. Fix
> it.
>
> Fixes: 5e123b844a1c ("[PATCH] Add tsi108/9 On Chip Ethernet device driver support")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> v2: move free_irq to error handling path and modify fixes tag
>
> [...]
Here is the summary with links:
- [net] ethernet: tundra: free irq when alloc ring failed in tsi108_open()
https://git.kernel.org/netdev/net/c/acce40037041
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-11-10 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-09 4:40 [PATCH net] ethernet: tundra: free irq when alloc ring failed in tsi108_open() Zhengchao Shao
2022-11-10 14:50 ` 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).