mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zheyu Ma <zheyuma97@gmail.com>
To: gustavo.pimentel@synopsys.com, vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zheyu Ma <zheyuma97@gmail.com>
Subject: [PATCH] dmaengine: dw-edma: Fix error handling in dw_edma_pcied_probe()
Date: Fri,  3 Dec 2021 06:11:15 +0000	[thread overview]
Message-ID: <20211203061115.19458-1-zheyuma97@gmail.com> (raw)

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


                 reply	other threads:[~2021-12-03  6:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211203061115.19458-1-zheyuma97@gmail.com \
    --to=zheyuma97@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®