Skip to content

Commit 537a147

Browse files
Zhang Changzhongkuba-moo
Zhang Changzhong
authored andcommitted
atl1c: fix error return code in atl1c_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 43250dd ("atl1c: Atheros L1C Gigabit Ethernet driver") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhang Changzhong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a5ebcbd commit 537a147

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/atheros/atl1c/atl1c_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,8 +2543,8 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
25432543
* various kernel subsystems to support the mechanics required by a
25442544
* fixed-high-32-bit system.
25452545
*/
2546-
if ((dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)) != 0) ||
2547-
(dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)) != 0)) {
2546+
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
2547+
if (err) {
25482548
dev_err(&pdev->dev, "No usable DMA configuration,aborting\n");
25492549
goto err_dma;
25502550
}

0 commit comments

Comments
 (0)