Commit b3df80ab authored by Jing Xiangfeng's avatar Jing Xiangfeng Committed by Mark Brown

ASoC: Intel: bytcht_es8316: Add missed put_device()

snd_byt_cht_es8316_mc_probe() misses to call put_device() in an error
path. Add the missed function call to fix it.

Fixes: ba49cf6f ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect")
Signed-off-by: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200714080918.148196-1-jingxiangfeng@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent fa291331
...@@ -543,8 +543,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) ...@@ -543,8 +543,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
if (cnt) { if (cnt) {
ret = device_add_properties(codec_dev, props); ret = device_add_properties(codec_dev, props);
if (ret) if (ret) {
put_device(codec_dev);
return ret; return ret;
}
} }
devm_acpi_dev_add_driver_gpios(codec_dev, byt_cht_es8316_gpios); devm_acpi_dev_add_driver_gpios(codec_dev, byt_cht_es8316_gpios);
......
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