aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2016-05-23 22:24:21 -0400
committerMark Brown <broonie@kernel.org>2016-05-24 11:54:50 -0400
commitf7aa23cb8dba96b92f46e47101d360c5e0fa4e3b (patch)
tree5db245f4bd8782b48372ef34d76f9e8941133bd5
parent29cf67b99527296e9c9b9f6995c1d271d21f79c0 (diff)
spi: spi-ep93xx: Fix the PTR_ERR() argument
PTR_ERR should access the value just tested by IS_ERR. The semantic patch that makes this change is available in scripts/coccinelle/tests/odd_ptr_err.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-ep93xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index bb00be8d1851..17a6387e20b5 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -567,7 +567,7 @@ static void ep93xx_spi_dma_transfer(struct ep93xx_spi *espi)
567 txd = ep93xx_spi_dma_prepare(espi, DMA_MEM_TO_DEV); 567 txd = ep93xx_spi_dma_prepare(espi, DMA_MEM_TO_DEV);
568 if (IS_ERR(txd)) { 568 if (IS_ERR(txd)) {
569 ep93xx_spi_dma_finish(espi, DMA_DEV_TO_MEM); 569 ep93xx_spi_dma_finish(espi, DMA_DEV_TO_MEM);
570 dev_err(&espi->pdev->dev, "DMA TX failed: %ld\n", PTR_ERR(rxd)); 570 dev_err(&espi->pdev->dev, "DMA TX failed: %ld\n", PTR_ERR(txd));
571 msg->status = PTR_ERR(txd); 571 msg->status = PTR_ERR(txd);
572 return; 572 return;
573 } 573 }