projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cceed1
)
ASoC: dmaengine: Add check to dma_dev
author
Hoegeun Kwon
<hoegeun.kwon@samsung.com>
Wed, 20 May 2020 07:41:06 +0000
(16:41 +0900)
committer
Hoegeun Kwon
<hoegeun.kwon@samsung.com>
Thu, 3 Aug 2023 08:44:02 +0000
(17:44 +0900)
A segmentation fault occurs when dma_dev is null. Add error handling
for dma_dev.
Change-Id: Ie8fa0b355c92bf59b937e3a5a399f8b299f94c74
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sound/soc/soc-generic-dmaengine-pcm.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-generic-dmaengine-pcm.c
b/sound/soc/soc-generic-dmaengine-pcm.c
index
4aa48c7
..
4b9fa37
100644
(file)
--- a/
sound/soc/soc-generic-dmaengine-pcm.c
+++ b/
sound/soc/soc-generic-dmaengine-pcm.c
@@
-117,6
+117,9
@@
dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component,
return -EINVAL;
}
+ if (!dma_dev)
+ return -ENODEV;
+
if (pcm->config && pcm->config->pcm_hardware)
return snd_soc_set_runtime_hwparams(substream,
pcm->config->pcm_hardware);