Skip to content

Commit

Permalink
ASoC: tpa6130a2: Remove goto err_gpio
Browse files Browse the repository at this point in the history
Replace goto err_gpio by return ret

Signed-off-by: Helen Koike <helen.koike@collabora.co.uk>
Tested-by: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Helen Koike authored and Mark Brown committed Jun 26, 2016
1 parent 6d2de5a commit 39088c2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions sound/soc/codecs/tpa6130a2.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
if (ret < 0) {
dev_err(dev, "Failed to request power GPIO (%d)\n",
data->power_gpio);
goto err_gpio;
return ret;
}
gpio_direction_output(data->power_gpio, 0);
}
Expand All @@ -277,12 +277,12 @@ static int tpa6130a2_probe(struct i2c_client *client,
if (IS_ERR(data->supply)) {
ret = PTR_ERR(data->supply);
dev_err(dev, "Failed to request supply: %d\n", ret);
goto err_gpio;
return ret;
}

ret = tpa6130a2_power(data, true);
if (ret != 0)
goto err_gpio;
return ret;


/* Read version */
Expand All @@ -294,13 +294,10 @@ static int tpa6130a2_probe(struct i2c_client *client,
/* Disable the chip */
ret = tpa6130a2_power(data, false);
if (ret != 0)
goto err_gpio;
return ret;

return devm_snd_soc_register_component(&client->dev,
&tpa6130a2_component_driver, NULL, 0);

err_gpio:
return ret;
}

static const struct i2c_device_id tpa6130a2_id[] = {
Expand Down

0 comments on commit 39088c2

Please sign in to comment.