]> git.karo-electronics.de Git - linux-beck.git/commitdiff
spi: rcar: Fix uninitialized variable warning
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 27 Nov 2013 00:41:44 +0000 (01:41 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 27 Nov 2013 16:31:31 +0000 (16:31 +0000)
The transfer data length variable is set based on the desired access
size, without a default case. This results in a compiler warning, even
though the access size is always set to a supported value. Create a
default case to silence the warning.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-rspi.c

index 58449ad4ad0d3a83eb273b49f292909078519ca1..a3dca1dfd8ab2593aab701e6d3b85c7b6596a3da 100644 (file)
@@ -268,7 +268,7 @@ static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
                spcmd = SPCMD_SPB_8BIT;
        else if (access_size == 16)
                spcmd = SPCMD_SPB_16BIT;
-       else if (access_size == 32)
+       else
                spcmd = SPCMD_SPB_32BIT;
 
        spcmd |= SPCMD_SCKDEN | SPCMD_SLNDEN | SPCMD_SSLKP | SPCMD_SPNDEN;