All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: uda1380: Return proper error in uda1380_modinit failure path
@ 2011-12-04 11:35 Axel Lin
  2011-12-04 11:37 ` [PATCH 2/3] ASoC: uda1380: Fix missed uda1380_reset call if pdata->gpio_power is a valid gpio Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Axel Lin @ 2011-12-04 11:35 UTC (permalink / raw)
  To: alsa-devel; +Cc: Philipp Zabel, Mark Brown, Liam Girdwood, Lars-Peter Clausen

Return proper error for uda1380_modinit if i2c_add_driver() fails.

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

diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 6b933ef..3a238cb 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -863,13 +863,13 @@ static struct i2c_driver uda1380_i2c_driver = {
 
 static int __init uda1380_modinit(void)
 {
-	int ret;
+	int ret = 0;
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 	ret = i2c_add_driver(&uda1380_i2c_driver);
 	if (ret != 0)
 		pr_err("Failed to register UDA1380 I2C driver: %d\n", ret);
 #endif
-	return 0;
+	return ret;
 }
 module_init(uda1380_modinit);
 
-- 
1.7.5.4

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

end of thread, other threads:[~2011-12-04 23:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-04 11:35 [PATCH 1/3] ASoC: uda1380: Return proper error in uda1380_modinit failure path Axel Lin
2011-12-04 11:37 ` [PATCH 2/3] ASoC: uda1380: Fix missed uda1380_reset call if pdata->gpio_power is a valid gpio Axel Lin
2011-12-04 13:02   ` Mark Brown
2011-12-04 18:55   ` Vasily
2011-12-04 11:38 ` [PATCH 3/3] ASoC: uda1380: Convert to gpio_request_one() Axel Lin
2011-12-04 23:46   ` Mark Brown
2011-12-04 13:00 ` [PATCH 1/3] ASoC: uda1380: Return proper error in uda1380_modinit failure path Mark Brown
2011-12-04 13:44   ` Axel Lin
2011-12-04 23:39 ` 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.