Commit 37551b45 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

rtase: Fix error code in rtase_init_board()

Return an error if dma_set_mask_and_coherent() fails.  Don't return
success.

Fixes: a36e9f5c ("rtase: Add support for a pci table in this module")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/f53ed942-5ac2-424b-a1ed-9473c599905e@stanley.mountainSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1b8c9cb3
...@@ -2023,7 +2023,8 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out, ...@@ -2023,7 +2023,8 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out,
if (ret < 0) if (ret < 0)
goto err_out_disable; goto err_out_disable;
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
if (ret) {
dev_err(&pdev->dev, "no usable dma addressing method\n"); dev_err(&pdev->dev, "no usable dma addressing method\n");
goto err_out_free_res; goto err_out_free_res;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment