All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tas2552: Return proper error for probe error paths
@ 2014-07-23  8:42 Axel Lin
  2014-07-25 17:54 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-07-23  8:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel@alsa-project.org, Liam Girdwood, Dan Murphy

Return error if devm_regulator_bulk_get() or snd_soc_register_codec() fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/tas2552.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index f0760af..05f3737 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -480,8 +480,10 @@ static int tas2552_probe(struct i2c_client *client,
 
 	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(data->supplies),
 				      data->supplies);
-	if (ret != 0)
+	if (ret != 0) {
 		dev_err(dev, "Failed to request supplies: %d\n", ret);
+		return ret;
+	}
 
 	pm_runtime_set_active(&client->dev);
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
@@ -498,7 +500,7 @@ static int tas2552_probe(struct i2c_client *client,
 	if (ret < 0)
 		dev_err(&client->dev, "Failed to register codec: %d\n", ret);
 
-	return 0;
+	return ret;
 }
 
 static int tas2552_i2c_remove(struct i2c_client *client)
-- 
1.9.1

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

* Re: [PATCH] ASoC: tas2552: Return proper error for probe error paths
  2014-07-23  8:42 [PATCH] ASoC: tas2552: Return proper error for probe error paths Axel Lin
@ 2014-07-25 17:54 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-07-25 17:54 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel@alsa-project.org, Liam Girdwood, Dan Murphy


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

On Wed, Jul 23, 2014 at 04:42:21PM +0800, Axel Lin wrote:
> Return error if devm_regulator_bulk_get() or snd_soc_register_codec() fails.

Applied, thanks.

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

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



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

end of thread, other threads:[~2014-07-25 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23  8:42 [PATCH] ASoC: tas2552: Return proper error for probe error paths Axel Lin
2014-07-25 17:54 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.