spi: spi-fsl-spi: call spi_finalize_current_message() at the end

[ Upstream commit 44a042182c ]

spi_finalize_current_message() shall be called once all
actions are finished, otherwise the last actions might
step over a newly started transfer.

Fixes: c592becbe7 ("spi: fsl-(e)spi: migrate to generic master queueing")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Christophe Leroy 2019-05-22 11:00:36 +00:00 committed by Greg Kroah-Hartman
parent 6a494caf49
commit 0d56b73c7e
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,6 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
}
m->status = status;
spi_finalize_current_message(master);
if (status || !cs_change) {
ndelay(nsecs);
@ -415,6 +414,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
}
fsl_spi_setup_transfer(spi, NULL);
spi_finalize_current_message(master);
return 0;
}