spi: signedness bug in qspi_trigger_transfer_out_int()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 3 Apr 2015 08:45:27 +0000 (11:45 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 6 Apr 2015 16:20:07 +0000 (17:20 +0100)
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>
drivers/spi/spi-rspi.c

index fd276f990d4dba33dfb9a1e6918934ccd954b739..186924aa4740e758af2075f417745487825b6163 100644 (file)
@@ -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) {