All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: bytcht_es8316: Add missed put_device()
@ 2020-07-14  8:09 ` Jing Xiangfeng
  0 siblings, 0 replies; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2020-07-17  0:05 UTC | newest]

Thread overview: 7+ 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  8:09 ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.