Skip to content

Commit 0269533

Browse files
Rasmus Villemoesgregkh
authored andcommitted
spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
commit 24c3636 upstream. __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> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f175f56 commit 0269533

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

drivers/spi/spi-fsl-spi.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,10 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
387387
cs_change = 1;
388388
status = -EINVAL;
389389
list_for_each_entry(t, &m->transfers, transfer_list) {
390-
if (t->bits_per_word || t->speed_hz) {
391-
if (cs_change)
392-
status = fsl_spi_setup_transfer(spi, t);
393-
if (status < 0)
394-
break;
395-
}
390+
if (cs_change)
391+
status = fsl_spi_setup_transfer(spi, t);
392+
if (status < 0)
393+
break;
396394

397395
if (cs_change) {
398396
fsl_spi_chipselect(spi, BITBANG_CS_ACTIVE);

0 commit comments

Comments
 (0)