aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-11-28 01:49:47 -0500
committerVinod Koul <vinod.koul@intel.com>2013-01-08 01:05:06 -0500
commit7c1119bdd650fa58dad8157bc75c5fcf6ed97843 (patch)
treef0694e33203d6c7f8db1f0904702a66480c3779b
parent944ea4dd38b8575e30a5699633c81945bff1864d (diff)
dma: sh: Don't use ENODEV for failing slave lookup
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> Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-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 8201bb4e0cd7..62eff4800521 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,
326 shdma_chan); 326 shdma_chan);
327 const struct sh_dmae_slave_config *cfg = dmae_find_slave(sh_chan, slave_id); 327 const struct sh_dmae_slave_config *cfg = dmae_find_slave(sh_chan, slave_id);
328 if (!cfg) 328 if (!cfg)
329 return -ENODEV; 329 return -ENXIO;
330 330
331 if (!try) 331 if (!try)
332 sh_chan->config = cfg; 332 sh_chan->config = cfg;