diff mbox series

[3/7] spi: dw: fix warning unused variable 'ret'

Message ID 20190524064751.713-1-ike.pan@canonical.com
State New
Headers show
Series Use gpiolib for chipselect in DW SPI driver | expand

Commit Message

Ike Panhc May 24, 2019, 6:47 a.m. UTC
From: Anders Roxell <anders.roxell@linaro.org>

BugLink: https://bugs.launchpad.net/bugs/1826142

When CONFIG_SPI_DESIGNWARE are enabled we see the unused variable
warning in dw_spi_setup.

../drivers/spi/spi-dw.c: In function ‘dw_spi_setup’:
../drivers/spi/spi-dw.c:400:6: warning: unused variable ‘ret’ [-Wunused-variable]
  int ret;
      ^~~

Remove the unused varable.

Fixes: 9400c41e77b8 ("spi: dw: Convert to use CS GPIO descriptors")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 4f0a0cd52d6c812fbf737e436b18f04eac2e312e)
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
 drivers/spi/spi-dw.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 531f6ce5900d..cb79ac41ae8d 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -396,7 +396,6 @@  static int dw_spi_setup(struct spi_device *spi)
 {
 	struct dw_spi_chip *chip_info = NULL;
 	struct chip_data *chip;
-	int ret;
 
 	/* Only alloc on first setup */
 	chip = spi_get_ctldata(spi);