mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-10 18:53:38 +00:00
mmc_spi: add a status check for spi_sync_locked
[ Upstream commit 611025983b
]
In case spi_sync_locked fails, the fix reports the error and
returns the error code upstream.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
059c2f5326
commit
fa291e8999
1 changed files with 4 additions and 0 deletions
|
@ -819,6 +819,10 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t,
|
|||
}
|
||||
|
||||
status = spi_sync_locked(spi, &host->m);
|
||||
if (status < 0) {
|
||||
dev_dbg(&spi->dev, "read error %d\n", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
if (host->dma_dev) {
|
||||
dma_sync_single_for_cpu(host->dma_dev,
|
||||
|
|
Loading…
Reference in a new issue