OpenCloudOS-Kernel/sound/soc/intel
Yang Yingliang 0e213813df
ASoC: Intel: Skylake: fix possible memory leak in skl_codec_device_init()
If snd_hdac_device_register() fails, 'codec' and name allocated in
dev_set_name() called in snd_hdac_device_init() are leaked. Fix this
by calling put_device(), so they can be freed in snd_hda_codec_dev_release()
and kobject_cleanup().

Fixes: e4746d94d0 ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Suggested-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221020105937.1448951-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-21 13:04:12 +01:00
..
atom ASoC: Updates for v6.1 2022-10-03 16:30:42 +02:00
avs ASoC: Updates for v6.1 2022-10-03 16:30:42 +02:00
boards ASoC: jz4752b: Capture fixes 2022-10-19 16:37:01 +01:00
catpt ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency 2022-08-16 13:08:03 +01:00
common ASoC: Intel: soc-acpi-intel-rpl-match: add rpl_sdca_3_in_1 support 2022-09-20 19:08:25 +01:00
keembay ASoC: Intel: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:27 +01:00
skylake ASoC: Intel: Skylake: fix possible memory leak in skl_codec_device_init() 2022-10-21 13:04:12 +01:00
Kconfig ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency 2022-08-16 13:08:03 +01:00
Makefile ASoC: Intel: Introduce AVS driver 2022-03-11 16:23:54 +00:00