Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/tlv320aic31xx' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Aug 4, 2014
2 parents 3674b71 + a72d2ab commit 7c08152
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sound/soc/codecs/tlv320aic31xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ static void aic31xx_pdata_from_of(struct aic31xx_priv *aic31xx)
}
#endif /* CONFIG_OF */

static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
{
int ret, i;

Expand All @@ -1197,7 +1197,7 @@ static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
"aic31xx-reset-pin");
if (ret < 0) {
dev_err(aic31xx->dev, "not able to acquire gpio\n");
return;
return ret;
}
}

Expand All @@ -1210,6 +1210,7 @@ static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
if (ret != 0)
dev_err(aic31xx->dev, "Failed to request supplies: %d\n", ret);

return ret;
}

static int aic31xx_i2c_probe(struct i2c_client *i2c,
Expand Down Expand Up @@ -1239,7 +1240,9 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c,

aic31xx->pdata.codec_type = id->driver_data;

aic31xx_device_init(aic31xx);
ret = aic31xx_device_init(aic31xx);
if (ret)
return ret;

return snd_soc_register_codec(&i2c->dev, &soc_codec_driver_aic31xx,
aic31xx_dai_driver,
Expand Down

0 comments on commit 7c08152

Please sign in to comment.