summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-spi.c
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2019-03-27 15:30:50 +0100
committerMark Brown <broonie@kernel.org>2019-04-01 10:48:13 +0200
commit24c363623361b430fb79459ca922e816e6f48603 (patch)
tree9bf467e61bdc81dd4f16fbd676baf6f18977f94e /drivers/spi/spi-fsl-spi.c
parentspi: stm32-qspi: add dma support (diff)
downloadlinux-24c363623361b430fb79459ca922e816e6f48603.tar.xz
linux-24c363623361b430fb79459ca922e816e6f48603.zip
spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
__spi_validate() in the generic SPI code sets ->speed_hz and ->bits_per_word to non-zero values, so this condition is always true. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-spi.c')
-rw-r--r--drivers/spi/spi-fsl-spi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 3d7b50c65f36..6d114daa178a 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -384,12 +384,10 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
cs_change = 1;
status = -EINVAL;
list_for_each_entry(t, &m->transfers, transfer_list) {
- if (t->bits_per_word || t->speed_hz) {
- if (cs_change)
- status = fsl_spi_setup_transfer(spi, t);
- if (status < 0)
- break;
- }
+ if (cs_change)
+ status = fsl_spi_setup_transfer(spi, t);
+ if (status < 0)
+ break;
if (cs_change) {
fsl_spi_chipselect(spi, BITBANG_CS_ACTIVE);