summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-img-spfi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-04-08 21:04:25 +0100
committerMark Brown <broonie@kernel.org>2015-04-08 21:04:25 +0100
commit89cda06d7f9c3c111a81fcdf5464926f5f984ebc (patch)
treebfa46c20c325feccd9de1a293e11686981d63e7b /drivers/spi/spi-img-spfi.c
parentede8342bf63166e8d8fc3c05fc0985b27cc8186b (diff)
parentf22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff)
downloadtalos-obmc-linux-89cda06d7f9c3c111a81fcdf5464926f5f984ebc.tar.gz
talos-obmc-linux-89cda06d7f9c3c111a81fcdf5464926f5f984ebc.zip
Merge tag 'v4.0-rc7' into spi-img-spfi
Linux 4.0-rc7
Diffstat (limited to 'drivers/spi/spi-img-spfi.c')
-rw-r--r--drivers/spi/spi-img-spfi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c
index 6c6ae4a9401a..c9f3bca988d7 100644
--- a/drivers/spi/spi-img-spfi.c
+++ b/drivers/spi/spi-img-spfi.c
@@ -466,6 +466,13 @@ static int img_spfi_transfer_one(struct spi_master *master,
unsigned long flags;
int ret;
+ if (xfer->len > SPFI_TRANSACTION_TSIZE_MASK) {
+ dev_err(spfi->dev,
+ "Transfer length (%d) is greater than the max supported (%d)",
+ xfer->len, SPFI_TRANSACTION_TSIZE_MASK);
+ return -EINVAL;
+ }
+
/*
* Stop all DMA and reset the controller if the previous transaction
* timed-out and never completed it's DMA.
OpenPOWER on IntegriCloud