Skip to content

Commit

Permalink
ASoC: Intel: bytcht_es8316: Add missed put_device()
Browse files Browse the repository at this point in the history
snd_byt_cht_es8316_mc_probe() misses to call put_device() in an error
path. Add the missed function call to fix it.

Fixes: ba49cf6 ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200714080918.148196-1-jingxiangfeng@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jing Xiangfeng authored and Mark Brown committed Jul 16, 2020
1 parent fa29133 commit b3df80a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/intel/boards/bytcht_es8316.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)

if (cnt) {
ret = device_add_properties(codec_dev, props);
if (ret)
if (ret) {
put_device(codec_dev);
return ret;
}
}

devm_acpi_dev_add_driver_gpios(codec_dev, byt_cht_es8316_gpios);
Expand Down

0 comments on commit b3df80a

Please sign in to comment.