Skip to content

Commit 39088c2

Browse files
Helen Koikebroonie
authored andcommitted
ASoC: tpa6130a2: Remove goto err_gpio
Replace goto err_gpio by return ret Signed-off-by: Helen Koike <[email protected]> Tested-by: Sebastian Reichel <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 6d2de5a commit 39088c2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

sound/soc/codecs/tpa6130a2.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
256256
if (ret < 0) {
257257
dev_err(dev, "Failed to request power GPIO (%d)\n",
258258
data->power_gpio);
259-
goto err_gpio;
259+
return ret;
260260
}
261261
gpio_direction_output(data->power_gpio, 0);
262262
}
@@ -277,12 +277,12 @@ static int tpa6130a2_probe(struct i2c_client *client,
277277
if (IS_ERR(data->supply)) {
278278
ret = PTR_ERR(data->supply);
279279
dev_err(dev, "Failed to request supply: %d\n", ret);
280-
goto err_gpio;
280+
return ret;
281281
}
282282

283283
ret = tpa6130a2_power(data, true);
284284
if (ret != 0)
285-
goto err_gpio;
285+
return ret;
286286

287287

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

299299
return devm_snd_soc_register_component(&client->dev,
300300
&tpa6130a2_component_driver, NULL, 0);
301-
302-
err_gpio:
303-
return ret;
304301
}
305302

306303
static const struct i2c_device_id tpa6130a2_id[] = {

0 commit comments

Comments
 (0)