* [PATCH] dmaengine: dw-edma: Fix error handling in dw_edma_pcied_probe()
@ 2021-12-03 6:11 Zheyu Ma
0 siblings, 0 replies; only message in thread
From: Zheyu Ma @ 2021-12-03 6:11 UTC (permalink / raw)
To: gustavo.pimentel, vkoul; +Cc: dmaengine, linux-kernel, Zheyu Ma
When err is a non-zero value, it means failure.
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
---
drivers/dma/dw-edma/dw-edma-pcie.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
index 198f6cd8ac1b..92c4f5b7d229 100644
--- a/drivers/dma/dw-edma/dw-edma-pcie.c
+++ b/drivers/dma/dw-edma/dw-edma-pcie.c
@@ -187,12 +187,10 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
/* DMA configuration */
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
- if (!err) {
+ if (err) {
pci_err(pdev, "DMA mask 64 set failed\n");
return err;
} else {
- pci_err(pdev, "DMA mask 64 set failed\n");
-
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (err) {
pci_err(pdev, "DMA mask 32 set failed\n");
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-03 6:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 6:11 [PATCH] dmaengine: dw-edma: Fix error handling in dw_edma_pcied_probe() Zheyu Ma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).