]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: synquacer: busy variable must be initialized before use
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Tue, 17 May 2022 08:41:36 +0000 (17:41 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 10 Jun 2022 17:37:32 +0000 (13:37 -0400)
"busy" variable is ORed without being initialized,
must be zeroed before use.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/spi/spi-synquacer.c

index ce558c4bc072e8da0a77df7dfc0691cea42bfcab..62f85f03353c968e06fa94158e3de76539fa66eb 100644 (file)
@@ -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);