spi: spi-zynq-qspi: Fix stack violation bug
authorKaren Dombroski <karen.dombroski@marsbioimaging.com>
Thu, 29 Apr 2021 05:38:02 +0000 (23:38 -0600)
committerMark Brown <broonie@kernel.org>
Thu, 29 Apr 2021 13:06:06 +0000 (14:06 +0100)
commit6d5ff8e632a4f2389c331e5554cd1c2a9a28c7aa
treef6ac6486e19690176af031300320271fc7054364
parent121271f08809e5dc01d15d3e529988ac5d740af6
spi: spi-zynq-qspi: Fix stack violation bug

When the number of bytes for the op is greater than one, the read could
run off the end of the function stack and cause a crash.

This patch restores the behaviour of safely reading out of the original
opcode location.

Signed-off-by: Karen Dombroski <karen.dombroski@marsbioimaging.com>
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Link: https://lore.kernel.org/r/20210429053802.17650-3-amit.kumar-mahapatra@xilinx.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-zynq-qspi.c