Skip to content

Commit

Permalink
spi: davinci: fix up dma_mapping_error() incorrect patch
Browse files Browse the repository at this point in the history
commit aabb797, which is commit
c5a2a39 upstream had an error in it.

Ben writes:
	The '!' needs to be deleted.  This appears to have been fixed upstream
	by:

	commit 8aedbf5
	Author: Fabien Parent <fparent@baylibre.com>
	Date:   Thu Feb 23 19:01:56 2017 +0100

	    spi: davinci: Use SPI framework to handle DMA mapping

	which is not suitable for stable.

So I'm just fixing this up directly.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Apr 8, 2018
1 parent 0151aaf commit bf7eb32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
buf = t->rx_buf;
t->rx_dma = dma_map_single(&spi->dev, buf,
t->len, DMA_FROM_DEVICE);
if (dma_mapping_error(&spi->dev, !t->rx_dma)) {
if (dma_mapping_error(&spi->dev, t->rx_dma)) {
ret = -EFAULT;
goto err_rx_map;
}
Expand Down

0 comments on commit bf7eb32

Please sign in to comment.