summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-dspi.c
diff options
context:
space:
mode:
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>2017-05-22 15:19:20 +0200
committerMark Brown <broonie@kernel.org>2017-05-22 17:14:22 +0200
commitcddebdd19c8e6cc41e04ac91c68000ff8c48383c (patch)
tree219c1f5fa76c83c44d8a4d9aaebd0d6ae6f25a48 /drivers/spi/spi-fsl-dspi.c
parentLinux 4.12-rc1 (diff)
downloadlinux-cddebdd19c8e6cc41e04ac91c68000ff8c48383c.tar.xz
linux-cddebdd19c8e6cc41e04ac91c68000ff8c48383c.zip
spi: spi-fsl-dspi: ensure non-zero return on error path
Propagate error return from dspi_request_dma() into probe routine's return. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-dspi.c')
-rw-r--r--drivers/spi/spi-fsl-dspi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 15201645bdc4..d89127f4a46d 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1032,7 +1032,8 @@ static int dspi_probe(struct platform_device *pdev)
goto out_master_put;
if (dspi->devtype_data->trans_mode == DSPI_DMA_MODE) {
- if (dspi_request_dma(dspi, res->start)) {
+ ret = dspi_request_dma(dspi, res->start);
+ if (ret < 0) {
dev_err(&pdev->dev, "can't get dma channels\n");
goto out_clk_put;
}