alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: core: Fail codec probe if we fail to add controls
@ 2014-04-01 12:59 Nariman Poushin
  2014-04-01 16:03 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Nariman Poushin @ 2014-04-01 12:59 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, patches, liam.r.girdwood

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 35c0e71..7f9ae6c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1127,9 +1127,17 @@ static int soc_probe_codec(struct snd_soc_card *card,
 
 	soc_init_codec_debugfs(codec);
 
-	if (driver->dapm_widgets)
-		snd_soc_dapm_new_controls(&codec->dapm, driver->dapm_widgets,
-					  driver->num_dapm_widgets);
+	if (driver->dapm_widgets) {
+		ret = snd_soc_dapm_new_controls(&codec->dapm,
+						driver->dapm_widgets,
+					  	driver->num_dapm_widgets);
+		
+		if (ret != 0) {
+			dev_err(codec->dev,
+				"Failed to create new controls %d\n", ret);
+			goto err_probe;
+		}
+	}
 
 	/* Create DAPM widgets for each DAI stream */
 	list_for_each_entry(dai, &codec->component.dai_list, list) {
-- 
1.8.5.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: core: Fail codec probe if we fail to add controls
  2014-04-01 12:59 [PATCH] ASoC: core: Fail codec probe if we fail to add controls Nariman Poushin
@ 2014-04-01 16:03 ` Mark Brown
  2014-04-02  8:29   ` Nariman Poushin
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2014-04-01 16:03 UTC (permalink / raw)
  To: Nariman Poushin; +Cc: alsa-devel, patches, liam.r.girdwood


[-- Attachment #1.1: Type: text/plain, Size: 444 bytes --]

On Tue, Apr 01, 2014 at 01:59:33PM +0100, Nariman Poushin wrote:
> Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>

Applied, but:

Applying: ASoC: core: Fail codec probe if we fail to add controls
/home/broonie/git/linux/.git/rebase-apply/patch:19: space before tab in
indent.
					  	driver->num_dapm_widgets);
/home/broonie/git/linux/.git/rebase-apply/patch:20: trailing whitespace.
		
please run checkpatch.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: core: Fail codec probe if we fail to add controls
  2014-04-01 16:03 ` Mark Brown
@ 2014-04-02  8:29   ` Nariman Poushin
  0 siblings, 0 replies; 3+ messages in thread
From: Nariman Poushin @ 2014-04-02  8:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches, liam.r.girdwood

On Tue, Apr 01, 2014 at 05:03:11PM +0100, Mark Brown wrote:
> On Tue, Apr 01, 2014 at 01:59:33PM +0100, Nariman Poushin wrote:
> > Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
> 
> Applied, but:
> 
> Applying: ASoC: core: Fail codec probe if we fail to add controls
> /home/broonie/git/linux/.git/rebase-apply/patch:19: space before tab in
> indent.
> 					  	driver->num_dapm_widgets);
> /home/broonie/git/linux/.git/rebase-apply/patch:20: trailing whitespace.
> 		
> please run checkpatch.

Will make sure to do in future, sorry for to the oversight.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-02  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 12:59 [PATCH] ASoC: core: Fail codec probe if we fail to add controls Nariman Poushin
2014-04-01 16:03 ` Mark Brown
2014-04-02  8:29   ` Nariman Poushin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).