diff options
author | Nikita Yushchenko <nikita.yoush@cogentembedded.com> | 2017-05-22 16:19:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-05-22 18:14:22 +0300 |
commit | cddebdd19c8e6cc41e04ac91c68000ff8c48383c (patch) | |
tree | 219c1f5fa76c83c44d8a4d9aaebd0d6ae6f25a48 /drivers/spi | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
download | linux-cddebdd19c8e6cc41e04ac91c68000ff8c48383c.tar.xz |
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')
-rw-r--r-- | drivers/spi/spi-fsl-dspi.c | 3 |
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; } |