OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddb6706
)
ASoC: core: check of_property_count_strings failure
author
Richard Zhao
<richard.zhao@freescale.com>
Tue, 24 Apr 2012 07:24:43 +0000
(15:24 +0800)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Tue, 24 Apr 2012 11:06:27 +0000
(12:06 +0100)
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
sound/soc/soc-core.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-core.c
b/sound/soc/soc-core.c
index
3a4e93e
..
b390f00
100644
(file)
--- a/
sound/soc/soc-core.c
+++ b/
sound/soc/soc-core.c
@@
-3631,10
+3631,10
@@
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
int i, ret;
num_routes = of_property_count_strings(np, propname);
- if (num_routes & 1) {
+ if (num_routes
< 0 || num_routes
& 1) {
dev_err(card->dev,
-
"Property '%s'
s length is not even\n",
-
propname);
+
"Property '%s' does not exist or it
s length is not even\n",
+ propname);
return -EINVAL;
}
num_routes /= 2;