[PATCH] spi: dw: fix warning unused variable 'ret'

From: Anders Roxell
Date: Thu Jan 10 2019 - 05:14:07 EST


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@xxxxxxxxxxxxxxxx>
Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
drivers/spi/spi-dw.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index f54b498001a9..7092e58add2c 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -397,7 +397,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);
--
2.20.1