Skip to content
Commit 6319a680 authored by Nobuteru Hayashi's avatar Nobuteru Hayashi Committed by Mark Brown
Browse files

spi/fsl-espi: avoid infinite loops on fsl_espi_cpu_irq()



It brought nearly infinite loops, and was possible to be
occurred only if the SPI transaction total size are not
alighed with 4. Loops are here at while (tmp--),
tmp is unsigned, and set it with minus value.

The loops are executed as a result of unexpected RX interrupt
occurrence after that. This interrupt may be hardware eratta
and is not fixed.

Fix mspi->len from minus value to 0 and print warning message.

Signed-off-by: default avatarNobuteru Hayashi <hayashi.nbb@ncos.nec.co.jp>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent aa70e567
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment