Skip to content

Commit b3df80a

Browse files
hiss2018broonie
authored andcommitted
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: ba49cf6 ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect") Signed-off-by: Jing Xiangfeng <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fa29133 commit b3df80a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/soc/intel/boards/bytcht_es8316.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
543543

544544
if (cnt) {
545545
ret = device_add_properties(codec_dev, props);
546-
if (ret)
546+
if (ret) {
547+
put_device(codec_dev);
547548
return ret;
549+
}
548550
}
549551

550552
devm_acpi_dev_add_driver_gpios(codec_dev, byt_cht_es8316_gpios);

0 commit comments

Comments
 (0)