Return error if devm_regulator_bulk_get() or snd_soc_register_codec() fails.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(data->supplies),
data->supplies);
- if (ret != 0)
+ if (ret != 0) {
dev_err(dev, "Failed to request supplies: %d\n", ret);
+ return ret;
+ }
pm_runtime_set_active(&client->dev);
pm_runtime_set_autosuspend_delay(&client->dev, 1000);
if (ret < 0)
dev_err(&client->dev, "Failed to register codec: %d\n", ret);
- return 0;
+ return ret;
}
static int tas2552_i2c_remove(struct i2c_client *client)