Skip to content

Commit 562a9f9

Browse files
insuyundavem330
authored andcommitted
et131x: check return value of dma_alloc_coherent
For error handling, dma_alloc_coherent's return value needs to be checked, not argument. Signed-off-by: Insu Yun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4fbe366 commit 562a9f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/agere/et131x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,7 @@ static int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter)
23802380
sizeof(u32),
23812381
&tx_ring->tx_status_pa,
23822382
GFP_KERNEL);
2383-
if (!tx_ring->tx_status_pa) {
2383+
if (!tx_ring->tx_status) {
23842384
dev_err(&adapter->pdev->dev,
23852385
"Cannot alloc memory for Tx status block\n");
23862386
return -ENOMEM;

0 commit comments

Comments
 (0)