From: Dan Carpenter Date: Fri, 3 Apr 2015 08:45:27 +0000 (+0300) Subject: spi: signedness bug in qspi_trigger_transfer_out_int() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c9bc3e8bf04225968f1cee34b50216263ed58000;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- 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) {