Commit 39088c25 authored by Helen Koike's avatar Helen Koike Committed by Mark Brown

ASoC: tpa6130a2: Remove goto err_gpio

Replace goto err_gpio by return ret
Signed-off-by: default avatarHelen Koike <helen.koike@collabora.co.uk>
Tested-by: default avatarSebastian Reichel <sre@kernel.org>
Reviewed-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6d2de5ab
...@@ -256,7 +256,7 @@ static int tpa6130a2_probe(struct i2c_client *client, ...@@ -256,7 +256,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
if (ret < 0) { if (ret < 0) {
dev_err(dev, "Failed to request power GPIO (%d)\n", dev_err(dev, "Failed to request power GPIO (%d)\n",
data->power_gpio); data->power_gpio);
goto err_gpio; return ret;
} }
gpio_direction_output(data->power_gpio, 0); gpio_direction_output(data->power_gpio, 0);
} }
...@@ -277,12 +277,12 @@ static int tpa6130a2_probe(struct i2c_client *client, ...@@ -277,12 +277,12 @@ static int tpa6130a2_probe(struct i2c_client *client,
if (IS_ERR(data->supply)) { if (IS_ERR(data->supply)) {
ret = PTR_ERR(data->supply); ret = PTR_ERR(data->supply);
dev_err(dev, "Failed to request supply: %d\n", ret); dev_err(dev, "Failed to request supply: %d\n", ret);
goto err_gpio; return ret;
} }
ret = tpa6130a2_power(data, true); ret = tpa6130a2_power(data, true);
if (ret != 0) if (ret != 0)
goto err_gpio; return ret;
/* Read version */ /* Read version */
...@@ -294,13 +294,10 @@ static int tpa6130a2_probe(struct i2c_client *client, ...@@ -294,13 +294,10 @@ static int tpa6130a2_probe(struct i2c_client *client,
/* Disable the chip */ /* Disable the chip */
ret = tpa6130a2_power(data, false); ret = tpa6130a2_power(data, false);
if (ret != 0) if (ret != 0)
goto err_gpio; return ret;
return devm_snd_soc_register_component(&client->dev, return devm_snd_soc_register_component(&client->dev,
&tpa6130a2_component_driver, NULL, 0); &tpa6130a2_component_driver, NULL, 0);
err_gpio:
return ret;
} }
static const struct i2c_device_id tpa6130a2_id[] = { static const struct i2c_device_id tpa6130a2_id[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment