]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
spi: spi-fsl-dspi: ensure non-zero return on error path
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Mon, 22 May 2017 13:19:20 +0000 (16:19 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 22 May 2017 15:14:22 +0000 (16:14 +0100)
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>
drivers/spi/spi-fsl-dspi.c

index 15201645bdc4ffed5f8d88e19c3a4be7bef37d00..d89127f4a46dfd567e2c7cfb290833d038c930ed 100644 (file)
@@ -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;
                }