linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: bytcht_es8316: Add missed put_device()
@ 2020-07-14  8:09 Jing Xiangfeng
  2020-07-14 13:33 ` Hans de Goede
  2020-07-16 23:57 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Jing Xiangfeng @ 2020-07-14  8:09 UTC (permalink / raw)
  To: cezary.rojewski, pierre-louis.bossart, liam.r.girdwood, yang.jie,
	broonie, perex, tiwai, hdegoede, kuninori.morimoto.gx, paul
  Cc: alsa-devel, linux-kernel, jingxiangfeng

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

Fixes: ba49cf6f8e4a ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 sound/soc/intel/boards/bytcht_es8316.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 9e5fc9430628..ecbc58e8a37f 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-16 23:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14  8:09 [PATCH] ASoC: Intel: bytcht_es8316: Add missed put_device() Jing Xiangfeng
2020-07-14 13:33 ` Hans de Goede
2020-07-14 15:32   ` Pierre-Louis Bossart
2020-07-14 19:29     ` Hans de Goede
2020-07-16 16:48       ` Pierre-Louis Bossart
2020-07-16 23:57 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).