mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
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: a915d150f6
('spi: tegra: convert to standard DMA DT bindings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
f1d6ff7939
commit
8a0a1af30c
1 changed files with 2 additions and 2 deletions
|
@ -630,7 +630,7 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi,
|
||||||
int ret;
|
int ret;
|
||||||
struct dma_slave_config dma_sconfig;
|
struct dma_slave_config dma_sconfig;
|
||||||
|
|
||||||
dma_chan = dma_request_slave_channel(tspi->dev,
|
dma_chan = dma_request_slave_channel_reason(tspi->dev,
|
||||||
dma_to_memory ? "rx" : "tx");
|
dma_to_memory ? "rx" : "tx");
|
||||||
if (IS_ERR(dma_chan)) {
|
if (IS_ERR(dma_chan)) {
|
||||||
ret = PTR_ERR(dma_chan);
|
ret = PTR_ERR(dma_chan);
|
||||||
|
|
Loading…
Reference in a new issue