All of lore.kernel.org
 help / color / mirror / Atom feed
From: garsilva@embeddedor.com (Gustavo A. R. Silva)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: zynqmp_dma: fix error return code in zynqmp_dma_chan_probe()
Date: Fri, 30 Jun 2017 02:42:47 -0500	[thread overview]
Message-ID: <20170630074247.GA26153@embeddedgus> (raw)

Print error message and propagate the return value of
platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/dma/xilinx/zynqmp_dma.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 6d221e5..5fa6d0d 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -996,8 +996,11 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
 
 	zynqmp_dma_init(chan);
 	chan->irq = platform_get_irq(pdev, 0);
-	if (chan->irq < 0)
-		return -ENXIO;
+	if (chan->irq < 0) {
+		dev_err(&pdev->dev, "failed to get IRQ: %d\n", chan->irq);
+		return chan->irq;
+	}
+
 	err = devm_request_irq(&pdev->dev, chan->irq, zynqmp_dma_irq_handler, 0,
 			       "zynqmp-dma", chan);
 	if (err)
-- 
2.5.0

WARNING: multiple messages have this Message-ID (diff)
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: "Vinod Koul" <vinod.koul@intel.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] dmaengine: zynqmp_dma: fix error return code in zynqmp_dma_chan_probe()
Date: Fri, 30 Jun 2017 02:42:47 -0500	[thread overview]
Message-ID: <20170630074247.GA26153@embeddedgus> (raw)

Print error message and propagate the return value of
platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/dma/xilinx/zynqmp_dma.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 6d221e5..5fa6d0d 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -996,8 +996,11 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
 
 	zynqmp_dma_init(chan);
 	chan->irq = platform_get_irq(pdev, 0);
-	if (chan->irq < 0)
-		return -ENXIO;
+	if (chan->irq < 0) {
+		dev_err(&pdev->dev, "failed to get IRQ: %d\n", chan->irq);
+		return chan->irq;
+	}
+
 	err = devm_request_irq(&pdev->dev, chan->irq, zynqmp_dma_irq_handler, 0,
 			       "zynqmp-dma", chan);
 	if (err)
-- 
2.5.0

             reply	other threads:[~2017-06-30  7:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  7:42 Gustavo A. R. Silva [this message]
2017-06-30  7:42 ` [PATCH] dmaengine: zynqmp_dma: fix error return code in zynqmp_dma_chan_probe() Gustavo A. R. Silva
2017-06-30 13:13 ` Sören Brinkmann
2017-06-30 13:13   ` Sören Brinkmann

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=20170630074247.GA26153@embeddedgus \
    --to=garsilva@embeddedor.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.