mmc_spi: add a status check for spi_sync_locked
Subsystems (2)
PATCH v2 1/1 mmc_spi: add a status check for spi_sync_locked
In case spi_sync_locked fails, the fix reports the error and returns the error code upstream.
Signed-off-by Kangjie Lu <[email protected]>
--- drivers/mmc/host/mmc_spi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/host/mmc_spi.c +4 -0
@@ -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,
Signature · 1 line
2.17.1
Hi Kangjie,
Thank you for the patch.
Quoted 4 lines · Kangjie Lu
In case
spi_sync_lockedfails, the fix reports the error and returns the error code upstream.Signed-off-by Kangjie Lu <[email protected]>
Reviewed-by Laurent Pinchart <[email protected]>
Quoted 19 lines
--- drivers/mmc/host/mmc_spi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/mmc_spi.c +4
-0@@ -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,
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 5 lines · Kangjie Lu
In case
spi_sync_lockedfails, the fix reports the error and returns the error code upstream.Signed-off-by Kangjie Lu <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 22 lines
--- drivers/mmc/host/mmc_spi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/mmc_spi.c +4
-1@@ -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, --2.17.1