Skip to content

Commit 27abb2f

Browse files
Wei YongjunVinod Koul
authored andcommitted
pch_dma: fix error return code in pch_dma_probe()
Fix to return -ENODEV when no proper base address found error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent ad81f05 commit 27abb2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/dma/pch_dma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ static int pch_dma_probe(struct pci_dev *pdev,
867867

868868
if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
869869
dev_err(&pdev->dev, "Cannot find proper base address\n");
870+
err = -ENODEV;
870871
goto err_disable_pdev;
871872
}
872873

0 commit comments

Comments
 (0)