]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failed
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 6 Nov 2017 01:07:27 +0000 (01:07 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 6 Nov 2017 11:29:44 +0000 (11:29 +0000)
commit492975ce1f0a3caa385edf17eba73aebc03677ef
treeed4a7643d0af85293058c11c1987aad889bdfe10
parent0eec09c28b89cb92960f4e20fcd8f4bb5e1769f4
ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failed

PTR_ERR(NULL) is success. Normally when a function returns both NULL
and error pointers, it means that NULL is not a error.
But, rsnd_dmaen_request_channel() returns NULL if requested resource
was failed.
Let's return -EIO if rsnd_dmaen_request_channel() was failed on
rsnd_dmaen_nolock_start().
This patch fixes commit 0738b3eff2ee ("ASoC: rsnd: Request/Release DMA
channel eachtime")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/dma.c