Skip to content

Commit 3a36060

Browse files
Zhang Changzhongkuba-moo
Zhang Changzhong
authored andcommitted
atl1e: fix error return code in atl1e_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: a6a5325 ("atl1e: Atheros L1E 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 537a147 commit 3a36060

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/atheros/atl1e/atl1e_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,8 +2312,8 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
23122312
* various kernel subsystems to support the mechanics required by a
23132313
* fixed-high-32-bit system.
23142314
*/
2315-
if ((dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)) != 0) ||
2316-
(dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)) != 0)) {
2315+
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
2316+
if (err) {
23172317
dev_err(&pdev->dev, "No usable DMA configuration,aborting\n");
23182318
goto err_dma;
23192319
}

0 commit comments

Comments
 (0)