Skip to contentSkip to conversation

net: 3com: 3c59x: fix possible null dereference in vortex_probe1()

PATCH Applied Thomas Fourier 2 participants 2 messages Jan 6 – Jan 8

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: 3com: 3c59x: fix possible null dereference in vortex_probe1()

pdev can be null and free_ring: can be called in 1297 with a null pdev.

Fixes 55c82617c3e8 ("3c59x: convert to generic DMA API")
---
 drivers/net/ethernet/3com/3c59x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/3com/3c59x.c +1 -1
index 8c9cc97efd4e..4fe4efdb3737 100644
@@ -1473,7 +1473,7 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,
 		return 0;
 
 free_ring:
-	dma_free_coherent(&pdev->dev,
+	dma_free_coherent(gendev,
 		sizeof(struct boom_rx_desc) * RX_RING_SIZE +
 		sizeof(struct boom_tx_desc) * TX_RING_SIZE,
 		vp->rx_ring, vp->rx_ring_dma);
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 6 Jan 2026 10:47:21 +0100 you wrote:

pdev can be null and free_ring: can be called in 1297 with a null pdev.

Fixes 55c82617c3e8 ("3c59x: convert to generic DMA API")

[...]

Here is the summary with links:
- [net] net: 3com: 3c59x: fix possible null dereference in vortex_probe1()

    https://git.kernel.org/netdev/net/c/a4e305ed60f7

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html