projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
667e933
)
ASoC: atom: fix a missing check of snd_pcm_lib_malloc_pages
author
Kangjie Lu
<
[email protected]
>
Wed, 26 Dec 2018 02:29:48 +0000
(20:29 -0600)
committer
Mark Brown
<
[email protected]
>
Mon, 7 Jan 2019 18:10:03 +0000
(18:10 +0000)
snd_pcm_lib_malloc_pages() may fail, so let's check its status and
return its error code upstream.
Signed-off-by: Kangjie Lu <
[email protected]
>
Acked-by: Pierre-Louis Bossart <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
Cc:
[email protected]
sound/soc/intel/atom/sst-mfld-platform-pcm.c
patch
|
blob
|
history
diff --git
a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index afc5598660955a462f1f2bfdf45fe9905a23e339..91a2436ce9525aea53c537ba1f879456050fcc66 100644
(file)
--- a/
sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/
sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@
-399,7
+399,13
@@
static int sst_media_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
- snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
+ int ret;
+
+ ret =
+ snd_pcm_lib_malloc_pages(substream,
+ params_buffer_bytes(params));
+ if (ret)
+ return ret;
memset(substream->runtime->dma_area, 0, params_buffer_bytes(params));
return 0;
}