Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: mpc512x: Call mpc512x_psc_spi_transfer_setup() unconditionally

SPI core validates both bits_per_word and speed_hz transfer parameters and
thus the if statement here is needless as it will always call the
mpc512x_psc_spi_transfer_setup().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jarkko Nikula and committed by
Mark Brown
85c1912d 6ff33f39

+3 -5
+3 -5
drivers/spi/spi-mpc512x-psc.c
··· 302 302 cs_change = 1; 303 303 status = 0; 304 304 list_for_each_entry(t, &m->transfers, transfer_list) { 305 - if (t->bits_per_word || t->speed_hz) { 306 - status = mpc512x_psc_spi_transfer_setup(spi, t); 307 - if (status < 0) 308 - break; 309 - } 305 + status = mpc512x_psc_spi_transfer_setup(spi, t); 306 + if (status < 0) 307 + break; 310 308 311 309 if (cs_change) 312 310 mpc512x_psc_spi_activate_cs(spi);