Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c1119bd authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Vinod Koul
Browse files

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent 944ea4dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;