linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alexandre.torgue@st.com, baohua@kernel.org, broonie@kernel.org,
	f.fainelli@gmail.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-rpi-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	Mark Brown <broonie@kernel.org>,
	mcoquelin.stm32@gmail.com, nsaenzjulienne@suse.de,
	rjui@broadcom.com, sbranden@broadcom.com, s.hauer@pengutronix.de,
	shawnguo@kernel.org, vkoul@kernel.org
Subject: Applied "spi: bcm2835: Release the DMA channel if probe fails after dma_init" to the spi tree
Date: Mon, 16 Dec 2019 12:06:17 +0000	[thread overview]
Message-ID: <applied-20191212135550.4634-3-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <20191212135550.4634-3-peter.ujfalusi@ti.com>

The patch

   spi: bcm2835: Release the DMA channel if probe fails after dma_init

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 666224b43b4bd4612ce3b758c038f9bc5c5e3fcb Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Thu, 12 Dec 2019 15:55:43 +0200
Subject: [PATCH] spi: bcm2835: Release the DMA channel if probe fails after
 dma_init

The DMA channel was not released if either devm_request_irq() or
devm_spi_register_controller() failed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20191212135550.4634-3-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-bcm2835.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index fb61a620effc..662d55e9f21d 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -1327,20 +1327,22 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 			       dev_name(&pdev->dev), ctlr);
 	if (err) {
 		dev_err(&pdev->dev, "could not request IRQ: %d\n", err);
-		goto out_clk_disable;
+		goto out_dma_release;
 	}
 
 	err = devm_spi_register_controller(&pdev->dev, ctlr);
 	if (err) {
 		dev_err(&pdev->dev, "could not register SPI controller: %d\n",
 			err);
-		goto out_clk_disable;
+		goto out_dma_release;
 	}
 
 	bcm2835_debugfs_create(bs, dev_name(&pdev->dev));
 
 	return 0;
 
+out_dma_release:
+	bcm2835_dma_release(ctlr, bs);
 out_clk_disable:
 	clk_disable_unprepare(bs->clk);
 out_controller_put:
-- 
2.20.1

  parent reply	other threads:[~2019-12-16 12:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 13:55 [PATCH 0/9] spi: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-12 13:55 ` [PATCH 1/9] spi: atmel: " Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: atmel: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 2/9] spi: bcm2835: Release the DMA channel if probe fails after dma_init Peter Ujfalusi
2019-12-16 11:34   ` Nicolas Saenz Julienne
2019-12-16 12:06   ` Mark Brown [this message]
2019-12-12 13:55 ` [PATCH 3/9] spi: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 4/9] spi: img-spfi: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: img-spfi: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 5/9] spi: mxs: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: mxs: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 6/9] spi: sirf: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: sirf: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 7/9] spi: spi-fsl-dspi: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: spi-fsl-dspi: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 8/9] spi: stm32-qspi: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:06   ` Applied "spi: stm32-qspi: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown
2019-12-12 13:55 ` [PATCH 9/9] spi: stm32: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-16 12:05   ` Applied "spi: stm32: Use dma_request_chan() instead dma_request_slave_channel()" to the spi tree Mark Brown

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=applied-20191212135550.4634-3-peter.ujfalusi@ti.com \
    --to=broonie@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=baohua@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=peter.ujfalusi@ti.com \
    --cc=rjui@broadcom.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).