From: Nikita Yushchenko Date: Mon, 22 May 2017 13:19:20 +0000 (+0300) Subject: spi: spi-fsl-dspi: ensure non-zero return on error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cddebdd19c8e6cc41e04ac91c68000ff8c48383c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- 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; }