aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-xilinx.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2013-06-09 13:07:28 +0000
committerMark Brown <[email protected]>2013-06-10 09:28:04 +0000
commite33d085d11e54bc9fb07b2555cd104d8e7b3089b (patch)
tree4ccf035adb8aacc450aabbbe1fc07a197e3198dd /drivers/spi/spi-xilinx.c
parentspi: spi-xilinx: Remove ISR race condition (diff)
downloadkernel-e33d085d11e54bc9fb07b2555cd104d8e7b3089b.tar.gz
kernel-e33d085d11e54bc9fb07b2555cd104d8e7b3089b.zip
spi: spi-xilinx: cleanup a check in xilinx_spi_txrx_bufs()
'!' has higher precedence than comparisons so the original condition is equivalent to "if (xspi->remaining_bytes == 0)". This makes the static checkers complain. xspi->remaining_bytes is signed and from looking at the code briefly, I think it might be able to go negative. I suspect that going negative may cause a bug, but I don't have the hardware and can't test. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-xilinx.c')
-rw-r--r--drivers/spi/spi-xilinx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 34d18dcfa0db..109a535b639c 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -315,7 +315,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
}
/* See if there is more data to send */
- if (!xspi->remaining_bytes > 0)
+ if (xspi->remaining_bytes <= 0)
break;
}