From 29d382b94e6a1b0eddb3b7ae52099c9736c37a20 Mon Sep 17 00:00:00 2001 From: Masahisa Kojima Date: Tue, 17 May 2022 17:41:36 +0900 Subject: [PATCH] spi: synquacer: busy variable must be initialized before use "busy" variable is ORed without being initialized, must be zeroed before use. Signed-off-by: Masahisa Kojima Signed-off-by: Satoru Okamoto Acked-by: Jassi Brar --- drivers/spi/spi-synquacer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c index ce558c4bc0..62f85f0335 100644 --- a/drivers/spi/spi-synquacer.c +++ b/drivers/spi/spi-synquacer.c @@ -275,7 +275,7 @@ static int synquacer_spi_xfer(struct udevice *dev, unsigned int bitlen, { struct udevice *bus = dev->parent; struct synquacer_spi_priv *priv = dev_get_priv(bus); - u32 val, words, busy; + u32 val, words, busy = 0; val = readl(priv->base + FIFOCFG); val |= (1 << RX_FLUSH); -- 2.39.5