Skip to contentSkip to conversation

ASoC: rt5640: Remove unneeded goto in rt5640_i2c_probe

PATCH Applied Axel Lin 2 participants 6 messages Jun 10, 2014 – Jun 21, 2014

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/3 ASoC: rt5640: Remove unneeded goto in rt5640_i2c_probe

---
 sound/soc/codecs/rt5640.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/soc/codecs/rt5640.c +2 -8
index de80e89..6bc6efd 100644
@@ -2215,14 +2215,8 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
 
 	rt5640->hp_mute = 1;
 
-	ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5640,
-			rt5640_dai, ARRAY_SIZE(rt5640_dai));
-	if (ret < 0)
-		goto err;
-
-	return 0;
-err:
-	return ret;
+	return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5640,
+				      rt5640_dai, ARRAY_SIZE(rt5640_dai));
 }
 
 static int rt5640_i2c_remove(struct i2c_client *i2c)
Signature · 1 line
1.8.3.2
author
#1 lore raw

PATCH 2/3 ASoC: rt5645: Remove unneeded goto in rt5645_i2c_probe

---
 sound/soc/codecs/rt5645.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/soc/codecs/rt5645.c +2 -8
index 02147be..a7762d0 100644
@@ -2345,14 +2345,8 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
 
 	}
 
-	ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5645,
-			rt5645_dai, ARRAY_SIZE(rt5645_dai));
-	if (ret < 0)
-		goto err;
-
-	return 0;
-err:
-	return ret;
+	return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5645,
+				      rt5645_dai, ARRAY_SIZE(rt5645_dai));
 }
 
 static int rt5645_i2c_remove(struct i2c_client *i2c)
Signature · 1 line
1.8.3.2
author
#3 lore raw

PATCH 3/3 ASoC: rt5677: Remove unneeded goto in rt5677_i2c_probe

In reply to Axel Lin
---
 sound/soc/codecs/rt5677.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/soc/codecs/rt5677.c +2 -8
index e7c401f..43c82cd 100644
@@ -3373,14 +3373,8 @@ static int rt5677_i2c_probe(struct i2c_client *i2c,
 		regmap_update_bits(rt5677->regmap, RT5677_IN1,
 					RT5677_IN_DF2, RT5677_IN_DF2);
 
-	ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5677,
-			rt5677_dai, ARRAY_SIZE(rt5677_dai));
-	if (ret < 0)
-		goto err;
-
-	return 0;
-err:
-	return ret;
+	return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5677,
+				      rt5677_dai, ARRAY_SIZE(rt5677_dai));
 }
 
 static int rt5677_i2c_remove(struct i2c_client *i2c)
Signature · 1 line
1.8.3.2