diff options
author | Mark Brown <broonie@kernel.org> | 2015-04-08 21:04:25 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-08 21:04:25 +0100 |
commit | 89cda06d7f9c3c111a81fcdf5464926f5f984ebc (patch) | |
tree | bfa46c20c325feccd9de1a293e11686981d63e7b /drivers/spi/spi-img-spfi.c | |
parent | ede8342bf63166e8d8fc3c05fc0985b27cc8186b (diff) | |
parent | f22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff) | |
download | talos-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.c | 7 |
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. |