summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-11-28 06:49:47 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-28 13:38:42 (GMT)
commit255ad6f9222cc28a7c76157fdeda8aa46029c34d (patch)
treecca091a9ff861caf033b99f01cbe6a197cac51d7
parent3a7b023830c56a1cf1d4fa8bcda1a94afc00b6d7 (diff)
downloadlinux-fsl-qoriq-255ad6f9222cc28a7c76157fdeda8aa46029c34d.tar.xz
dma: sh: Don't use ENODEV for failing slave lookup
commit 7c1119bdd650fa58dad8157bc75c5fcf6ed97843 upstream. If dmaengine driver's .device_alloc_chan_resources() method returns -ENODEV, dma_request_channel() will decide, that the driver has been removed and will remove the device from its list. To prevent this use ENXIO if a slave lookup fails. Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/dma/sh/shdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 3315e4b..b70709b 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -326,7 +326,7 @@ static int sh_dmae_set_slave(struct shdma_chan *schan,
shdma_chan);
const struct sh_dmae_slave_config *cfg = dmae_find_slave(sh_chan, slave_id);
if (!cfg)
- return -ENODEV;
+ return -ENXIO;
if (!try)
sh_chan->config = cfg;