Skip to content

Commit a4e305e

Browse files
Thomas-fourierkuba-moo
authored andcommitted
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: 55c8261 ("3c59x: convert to generic DMA API") Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Link: https://patch.msgid.link/20260106094731.25819-2-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent c1d73b1 commit a4e305e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/3com/3c59x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,
14731473
return 0;
14741474

14751475
free_ring:
1476-
dma_free_coherent(&pdev->dev,
1476+
dma_free_coherent(gendev,
14771477
sizeof(struct boom_rx_desc) * RX_RING_SIZE +
14781478
sizeof(struct boom_tx_desc) * TX_RING_SIZE,
14791479
vp->rx_ring, vp->rx_ring_dma);

0 commit comments

Comments
 (0)