mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
spi: spi-msm-geni: Propagate missing change from 4.19 to 5.4
Propagate following change from 4.19 to 5.4 for SPI driver.
'commit 67192635d468 ("spi: spi-geni-qcom: Check for zero length
transfer")'.
Change-Id: I27bdd8b544ba1bdaa0a868d2260c4f76c156c215
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
This commit is contained in:
parent
e71111a9fa
commit
c5d86f08db
1 changed files with 6 additions and 0 deletions
|
|
@ -1213,6 +1213,12 @@ static int spi_geni_transfer_one(struct spi_master *spi,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Check for zero length transfer */
|
||||
if (xfer->len < 1) {
|
||||
dev_err(mas->dev, "Zero length transfer\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mas->cur_xfer_mode != GSI_DMA) {
|
||||
reinit_completion(&mas->xfer_done);
|
||||
setup_fifo_xfer(xfer, mas, slv->mode, spi);
|
||||
|
|
|
|||
Loading…
Reference in a new issue