* Patch "spi: davinci: use dma_mapping_error()" has been added to the 4.9-stable tree
@ 2017-07-03 11:33 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-03 11:33 UTC (permalink / raw)
To: khilman, alexander.levin, broonie, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
spi: davinci: use dma_mapping_error()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
spi-davinci-use-dma_mapping_error.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Mon Jul 3 13:29:10 CEST 2017
From: Kevin Hilman <khilman@baylibre.com>
Date: Wed, 11 Jan 2017 18:18:40 -0800
Subject: spi: davinci: use dma_mapping_error()
From: Kevin Hilman <khilman@baylibre.com>
[ Upstream commit c5a2a394835f473ae23931eda5066d3771d7b2f8 ]
The correct error checking for dma_map_single() is to use
dma_mapping_error().
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-davinci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -646,7 +646,7 @@ static int davinci_spi_bufs(struct spi_d
buf = t->rx_buf;
t->rx_dma = dma_map_single(&spi->dev, buf,
t->len, DMA_FROM_DEVICE);
- if (!t->rx_dma) {
+ if (dma_mapping_error(&spi->dev, !t->rx_dma)) {
ret = -EFAULT;
goto err_rx_map;
}
@@ -660,7 +660,7 @@ static int davinci_spi_bufs(struct spi_d
buf = (void *)t->tx_buf;
t->tx_dma = dma_map_single(&spi->dev, buf,
t->len, DMA_TO_DEVICE);
- if (!t->tx_dma) {
+ if (dma_mapping_error(&spi->dev, t->tx_dma)) {
ret = -EFAULT;
goto err_tx_map;
}
Patches currently in stable-queue which might be from khilman@baylibre.com are
queue-4.9/spi-davinci-use-dma_mapping_error.patch
queue-4.9/arm64-dts-meson-gxbb-odroidc2-fix-gbe-tx-link-breakage.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-03 11:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 11:33 Patch "spi: davinci: use dma_mapping_error()" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox