From: Dan Carpenter Date: Mon, 16 Dec 2013 14:02:10 +0000 (+0300) Subject: spi: tegra: checking for ERR_PTR instead of NULL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a0a1af30cbf56b41220a02e34835022c4d72f41;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spi: tegra: checking for ERR_PTR instead of NULL dma_request_slave_channel() returns NULL on error and not ERR_PTRs. I've fixed this by using dma_request_slave_channel_reason() which does return ERR_PTRs. Fixes: a915d150f68d ('spi: tegra: convert to standard DMA DT bindings') Signed-off-by: Dan Carpenter Signed-off-by: Stephen Warren --- diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index dd6f26c05947..a728bb82090f 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -630,8 +630,8 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi, int ret; struct dma_slave_config dma_sconfig; - dma_chan = dma_request_slave_channel(tspi->dev, - dma_to_memory ? "rx" : "tx"); + dma_chan = dma_request_slave_channel_reason(tspi->dev, + dma_to_memory ? "rx" : "tx"); if (IS_ERR(dma_chan)) { ret = PTR_ERR(dma_chan); if (ret != -EPROBE_DEFER)