* [patch] spi: tegra: checking for ERR_PTR instead of NULL
@ 2013-12-16 14:02 Dan Carpenter
2013-12-16 16:55 ` Stephen Warren
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-12-16 14:02 UTC (permalink / raw)
To: Laxman Dewangan
Cc: Mark Brown, Stephen Warren, Thierry Reding,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
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 <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 1e61e9854064..be3a069879c3 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -612,8 +612,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)
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] spi: tegra: checking for ERR_PTR instead of NULL
2013-12-16 14:02 [patch] spi: tegra: checking for ERR_PTR instead of NULL Dan Carpenter
@ 2013-12-16 16:55 ` Stephen Warren
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2013-12-16 16:55 UTC (permalink / raw)
To: Dan Carpenter, Laxman Dewangan
Cc: Mark Brown, Thierry Reding, linux-spi, linux-tegra,
kernel-janitors
On 12/16/2013 07:02 AM, Dan Carpenter wrote:
> 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 <dan.carpenter@oracle.com>
Oops. I validate there aren't any more issues like this, at least in the
commits in the series this fixes.
I've applied this to Tegra's for-3.14/dmas-resets-rework branch, since
that's the only place where the commit this fixes exists.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-16 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 14:02 [patch] spi: tegra: checking for ERR_PTR instead of NULL Dan Carpenter
2013-12-16 16:55 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).