Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify
error path and fix potentially wrong assignment if ->probe() fails.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
int ret;
- ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(codec->dev),
- bdw_rt5677_gpios);
+ ret = devm_acpi_dev_add_driver_gpios(codec->dev, bdw_rt5677_gpios);
if (ret)
dev_warn(codec->dev, "Failed to add driver gpios\n");