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 16:14:22 +0100 |
commit | cddebdd19c8e6cc41e04ac91c68000ff8c48383c (patch) | |
tree | 219c1f5fa76c83c44d8a4d9aaebd0d6ae6f25a48 | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
download | op-kernel-dev-cddebdd19c8e6cc41e04ac91c68000ff8c48383c.zip op-kernel-dev-cddebdd19c8e6cc41e04ac91c68000ff8c48383c.tar.gz |
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>
-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 1520164..d89127f 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; } |