From: Wei Yongjun Date: Wed, 3 Apr 2013 13:06:40 +0000 (+0800) Subject: mxs/spi: fix error return code in mxs_spi_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58ad60bbb2abada33fbeae88943ab038e2fcc0ef;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mxs/spi: fix error return code in mxs_spi_probe() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 22a0af0147fb..a1d5778e2bbb 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -612,6 +612,7 @@ static int mxs_spi_probe(struct platform_device *pdev) ssp->dmach = dma_request_channel(mask, mxs_ssp_dma_filter, ssp); if (!ssp->dmach) { dev_err(ssp->dev, "Failed to request DMA\n"); + ret = -ENODEV; goto out_master_free; }