summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-rspi.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-04-03 10:45:27 +0200
committerMark Brown <broonie@kernel.org>2015-04-06 18:20:07 +0200
commitc9bc3e8bf04225968f1cee34b50216263ed58000 (patch)
tree1326d33f451d5bdb8534e4bccf8772781e63d060 /drivers/spi/spi-rspi.c
parentspi: Using Trigger number to transmit/receive data (diff)
downloadlinux-c9bc3e8bf04225968f1cee34b50216263ed58000.tar.xz
linux-c9bc3e8bf04225968f1cee34b50216263ed58000.zip
spi: signedness bug in qspi_trigger_transfer_out_int()
We need "ret" to be unsigned for the error handling to work. The signedness of "i" and "n" don't matter but qspi_set_send_trigger() returns an int so I've changed them to int as well. Fixes: 4b6fe3edcbba ('spi: Using Trigger number to transmit/receive data') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rspi.c')
-rw-r--r--drivers/spi/spi-rspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index fd276f990d4d..186924aa4740 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -727,7 +727,7 @@ static int rspi_rz_transfer_one(struct spi_master *master,
static int qspi_trigger_transfer_out_int(struct rspi_data *rspi, const u8 *tx,
u8 *rx, unsigned int len)
{
- unsigned int i, n, ret;
+ int i, n, ret;
int error;
while (len > 0) {