spi: img-spfi: fix kbuild test robot warning
authorSifan Naeem <sifan.naeem@imgtec.com>
Thu, 6 Aug 2015 09:33:01 +0000 (10:33 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 6 Aug 2015 11:26:01 +0000 (12:26 +0100)
drivers/spi/spi-img-spfi.c: In function 'img_spfi_setup':
drivers/spi/spi-img-spfi.c:446: warning: 'ret' may be used
uninitialized in this function.

Fixes: commit b03ba9e314c1 ("spi: img-spfi: fix multiple calls to request gpio")
Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
drivers/spi/spi-img-spfi.c

index 1ba90562d72acddb7ffb85b0526203e620a2749f..61f7748aba4d4f5f79897f4e071282f9d745bbd4 100644 (file)
@@ -443,7 +443,7 @@ static int img_spfi_unprepare(struct spi_master *master,
 
 static int img_spfi_setup(struct spi_device *spi)
 {
-       int ret;
+       int ret = -EINVAL;
        struct img_spfi_device_data *spfi_data = spi_get_ctldata(spi);
 
        if (!spfi_data) {