diff options
author | Mark Brown <broonie@linaro.org> | 2014-08-04 16:31:17 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-04 16:31:17 +0100 |
commit | 7196be58ca832b6b37965921714849276f8996bc (patch) | |
tree | 2529b7a696cd2ceaaa9a6e3095496ae672111a20 /sound/soc | |
parent | a1cb98ac8b6980fcd530271c739c3dd7436a91aa (diff) | |
parent | 0e400c53812e11442785019de7df02e6adc71311 (diff) | |
download | linux-4.9-exynos9110-7196be58ca832b6b37965921714849276f8996bc.tar.gz linux-4.9-exynos9110-7196be58ca832b6b37965921714849276f8996bc.tar.bz2 linux-4.9-exynos9110-7196be58ca832b6b37965921714849276f8996bc.zip |
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-core.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 28caa63ae526..2d6c8b86b7d3 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4518,9 +4518,16 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_codec); int snd_soc_of_parse_card_name(struct snd_soc_card *card, const char *propname) { - struct device_node *np = card->dev->of_node; + struct device_node *np; int ret; + if (!card->dev) { + pr_err("card->dev is not set before calling %s\n", __func__); + return -EINVAL; + } + + np = card->dev->of_node; + ret = of_property_read_string_index(np, propname, 0, &card->name); /* * EINVAL means the property does not exist. This is fine providing |