projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6787b6
)
spi: fsl-lpspi: quit reading rx fifo under error condition
author
Gao Pan
<pandy.gao@nxp.com>
Fri, 2 Dec 2016 03:50:01 +0000
(11:50 +0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 5 Dec 2016 11:45:03 +0000
(11:45 +0000)
In case that error occurs during waiting for txfifo empty, it is
not necessary to read rx fifo. It's better to return directly.
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lpspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-fsl-lpspi.c
b/drivers/spi/spi-fsl-lpspi.c
index
c4a4e26
..
52551f6
100644
(file)
--- a/
drivers/spi/spi-fsl-lpspi.c
+++ b/
drivers/spi/spi-fsl-lpspi.c
@@
-350,9
+350,12
@@
static int fsl_lpspi_transfer_one(struct spi_master *master,
}
ret = fsl_lpspi_txfifo_empty(fsl_lpspi);
+ if (ret)
+ return ret;
+
fsl_lpspi_read_rx_fifo(fsl_lpspi);
- return
ret
;
+ return
0
;
}
static int fsl_lpspi_transfer_one_msg(struct spi_master *master,