The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] spi: spi-fsl-dspi: ensure non-zero return on error path
@ 2017-05-22 13:19 Nikita Yushchenko
  2017-05-23 18:22 ` Applied "spi: spi-fsl-dspi: ensure non-zero return on error path" to the spi tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Nikita Yushchenko @ 2017-05-22 13:19 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-spi, linux-kernel, Chris Healy, Jeff White,
	Nikita Yushchenko

Propagate error return from dspi_request_dma() into probe routine's
return.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/spi/spi-fsl-dspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 		}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-23 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-22 13:19 [PATCH] spi: spi-fsl-dspi: ensure non-zero return on error path Nikita Yushchenko
2017-05-23 18:22 ` Applied "spi: spi-fsl-dspi: ensure non-zero return on error path" to the spi tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox