diff options
author | Mark Brown <broonie@kernel.org> | 2015-04-08 22:04:25 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-08 22:04:25 +0200 |
commit | 89cda06d7f9c3c111a81fcdf5464926f5f984ebc (patch) | |
tree | bfa46c20c325feccd9de1a293e11686981d63e7b /drivers/spi/spi-img-spfi.c | |
parent | spi: img-spfi: Setup TRANSACTION register before CONTROL register (diff) | |
parent | Linux 4.0-rc7 (diff) | |
download | linux-89cda06d7f9c3c111a81fcdf5464926f5f984ebc.tar.xz 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. |