hw/ssi/xilinx_spips: Fix flash erase assert in dual parallel configuration
authorShiva sagar Myana <Shivasagar.Myana@amd.com>
Tue, 24 Sep 2024 11:20:35 +0000 (16:50 +0530)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 1 Oct 2024 12:55:38 +0000 (13:55 +0100)
commita8cc14435e675e86cba9afce8aa5e098b2e43ff4
tree710ddb8f743ea34a9f1d65b3607ecc2735a46285
parent67d762e716a7127ecc114e9708254316dd521911
hw/ssi/xilinx_spips: Fix flash erase assert in dual parallel configuration

Ensure that the FIFO is checked for emptiness before popping data
from it.  Previously, the code directly popped the data from the FIFO
without checking, which could cause an assertion failure:

../util/fifo8.c:67: fifo8_pop: Assertion `fifo->num > 0' failed.

Signed-off-by: Shiva sagar Myana <Shivasagar.Myana@amd.com>
Message-id: 20240924112035.1320865-1-Shivasagar.Myana@amd.com
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
[PMM: tweaked commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/ssi/xilinx_spips.c