Skip to content

Commit 37551b4

Browse files
Dan Carpenterkuba-moo
authored andcommitted
rtase: Fix error code in rtase_init_board()
Return an error if dma_set_mask_and_coherent() fails. Don't return success. Fixes: a36e9f5 ("rtase: Add support for a pci table in this module") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1b8c9cb commit 37551b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/realtek/rtase/rtase_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,8 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out,
20232023
if (ret < 0)
20242024
goto err_out_disable;
20252025

2026-
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
2026+
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
2027+
if (ret) {
20272028
dev_err(&pdev->dev, "no usable dma addressing method\n");
20282029
goto err_out_free_res;
20292030
}

0 commit comments

Comments
 (0)