diff options
author | Helen Koike <helen.koike@collabora.co.uk> | 2016-06-23 16:23:14 -0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-06-26 12:28:13 +0100 |
commit | 39088c251c69d3b7b288e30228aed06e1d339da5 (patch) | |
tree | c34ea84b1ca78bfe2a53e07f4325dc7d43763db5 /sound/soc/codecs/tpa6130a2.c | |
parent | 6d2de5ab4328718302c54b20222c6b1a574c3fce (diff) | |
download | lwn-39088c251c69d3b7b288e30228aed06e1d339da5.tar.gz lwn-39088c251c69d3b7b288e30228aed06e1d339da5.zip |
ASoC: tpa6130a2: Remove goto err_gpio
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>
Diffstat (limited to 'sound/soc/codecs/tpa6130a2.c')
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 9da1dd12f839..f1ea052a822e 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -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); } @@ -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 */ @@ -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[] = { |