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:
4958471
)
ASoC: Add a sanity check before using dai driver name
author
Jeffy Chen
<
[email protected]
>
Thu, 24 Aug 2017 04:40:17 +0000
(12:40 +0800)
committer
Mark Brown
<
[email protected]
>
Fri, 25 Aug 2017 13:49:44 +0000
(14:49 +0100)
The dai driver's name is allowed to be NULL. So add a sanity check for
that.
Signed-off-by: Jeffy Chen <
[email protected]
>
Reported-by: Donglin Peng <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/soc-core.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-core.c
b/sound/soc/soc-core.c
index 6fab0ff213ef16b5afd533c60a829b1d31a14752..74c17068bb116059639af33103c24b9fd916e654 100644
(file)
--- a/
sound/soc/soc-core.c
+++ b/
sound/soc/soc-core.c
@@
-1029,7
+1029,8
@@
struct snd_soc_dai *snd_soc_find_dai(
continue;
list_for_each_entry(dai, &component->dai_list, list) {
if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)
- && strcmp(dai->driver->name, dlc->dai_name))
+ && (!dai->driver->name
+ || strcmp(dai->driver->name, dlc->dai_name)))
continue;
return dai;