From 8abab35f9a58e15b1f90a1371da69a207e40fc3b Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Thu, 12 Jan 2017 11:38:15 +0000 Subject: ASoC: Fixup some small kernel-doc typos Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/soc-ac97.c | 2 +- sound/soc/soc-core.c | 2 +- sound/soc/soc-ops.c | 2 +- sound/soc/soc-topology.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sound/soc') diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c index 6c8b0b0c56ec..36dae41f65fc 100644 --- a/sound/soc/soc-ac97.c +++ b/sound/soc/soc-ac97.c @@ -251,7 +251,7 @@ EXPORT_SYMBOL_GPL(snd_soc_new_ac97_codec); /** * snd_soc_free_ac97_codec - free AC97 codec device - * @codec: audio codec + * @ac97: snd_ac97 device to be freed * * Frees AC97 codec device resources. */ diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f1901bb1466e..24dc443ec019 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -979,7 +979,7 @@ EXPORT_SYMBOL_GPL(snd_soc_find_dai); * @card: soc card * @id: DAI link ID to match * @name: DAI link name to match, optional - * @stream name: DAI link stream name to match, optional + * @stream_name: DAI link stream name to match, optional * * This function will search all existing DAI links of the soc card to * find the link of the same ID. Since DAI links may not have their diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 9fc1a7bb8b95..500f98c730b9 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -120,7 +120,7 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, EXPORT_SYMBOL_GPL(snd_soc_put_enum_double); /** - * snd_soc_read_signed - Read a codec register and interprete as signed value + * snd_soc_read_signed - Read a codec register and interpret as signed value * @component: component * @reg: Register to read * @mask: Mask to use after shifting the register value diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 65670b2b408c..9f0211153bfd 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1919,7 +1919,7 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg, /** * set_link_hw_format - Set the HW audio format of the physical DAI link. - * @tplg: topology context + * @link: &snd_soc_dai_link which should be updated * @cfg: physical link configs. * * Topology context contains a list of supported HW formats (configs) and @@ -1970,7 +1970,7 @@ static void set_link_hw_format(struct snd_soc_dai_link *link, /** * link_new_ver - Create a new physical link config from the old * version of source. - * @toplogy: topology context + * @tplg: topology context * @src: old version of phyical link config as a source * @link: latest version of physical link config created from the source * @@ -2212,7 +2212,7 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg, /** * manifest_new_ver - Create a new version of manifest from the old version * of source. - * @toplogy: topology context + * @tplg: topology context * @src: old version of manifest as a source * @manifest: latest version of manifest created from the source * -- cgit v1.2.3 From 3f81d9aa80ae4b513416440e416a6486ef2ad817 Mon Sep 17 00:00:00 2001 From: Shailendra Verma Date: Fri, 27 Jan 2017 16:40:57 +0530 Subject: ASoC: davinci - Fix possible NULL derefrence. of_match_device could return NULL, and so can cause a NULL pointer dereference later. Signed-off-by: Shailendra Verma Signed-off-by: Mark Brown --- sound/soc/davinci/davinci-evm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sound/soc') diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index 731fb0d86c6a..7a369e0f2093 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -358,13 +358,20 @@ static struct snd_soc_card evm_soc_card = { static int davinci_evm_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match = - of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev); - struct snd_soc_dai_link *dai = (struct snd_soc_dai_link *) match->data; + const struct of_device_id *match; + struct snd_soc_dai_link *dai; struct snd_soc_card_drvdata_davinci *drvdata = NULL; struct clk *mclk; int ret = 0; + match = of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev); + if (!match) { + dev_err(&pdev->dev, "Error: No device match found\n"); + return -ENODEV; + } + + dai = (struct snd_soc_dai_link *) match->data; + evm_soc_card.dai_link = dai; dai->codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0); -- cgit v1.2.3 From d6075c2601800a8a45bf6f7c3d87afa8598779b5 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Wed, 1 Feb 2017 15:37:35 +0200 Subject: ASoC: Drop unnecessary debugfs ifdef This is a relict of 6553bf06a369 ("ASoC: Don't try to register debugfs entries if the parent does not exist"). Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound/soc') diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f1901bb1466e..7728cce019f9 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4020,8 +4020,6 @@ static void __exit snd_soc_exit(void) snd_soc_util_exit(); snd_soc_debugfs_exit(); -#ifdef CONFIG_DEBUG_FS -#endif platform_driver_unregister(&soc_driver); } module_exit(snd_soc_exit); -- cgit v1.2.3