diff options
author | Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> | 2021-11-18 03:10:41 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-11-18 13:57:55 +0000 |
commit | 1d734f592e1a1d41af80e90001d109cec1c98fb4 (patch) | |
tree | 32d7eeba314af6aa4cf8c682aff0e5408b7a7013 /drivers | |
parent | aadbff4af5c90919cbe67e2c4d77c68cdefa454e (diff) | |
download | linux-1d734f592e1a1d41af80e90001d109cec1c98fb4.tar.bz2 |
spi: spi-rspi: Drop redeclaring ret variable in qspi_transfer_in()
"ret" variable is already declared in qspi_transfer_in() at the
beginning of function, drop redeclaring ret in the if block, fixing
below:
spi-rspi.c: In function ‘qspi_transfer_in’:
spi-rspi.c:838:7: warning: declaration of ‘ret’ shadows a previous local
838 | int ret = rspi_dma_transfer(rspi, NULL, &xfer->rx_sg);
| ^~~
spi-rspi.c:835:6: note: shadowed declaration is here
835 | int ret;
Fixes: db30083813b55 ("spi: rspi: avoid uninitialized variable access")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20211118031041.2312-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-rspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index b7df49a57e5f..bd5708d7e5a1 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -835,7 +835,7 @@ static int qspi_transfer_in(struct rspi_data *rspi, struct spi_transfer *xfer) int ret; if (rspi->ctlr->can_dma && __rspi_can_dma(rspi, xfer)) { - int ret = rspi_dma_transfer(rspi, NULL, &xfer->rx_sg); + ret = rspi_dma_transfer(rspi, NULL, &xfer->rx_sg); if (ret != -EAGAIN) return ret; } |