--- /dev/null
+From 515626a33a194c4caaf2879dbf9e00e882582af0 Mon Sep 17 00:00:00 2001
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+Date: Mon, 22 Aug 2022 11:51:33 +0800
+Subject: ASoC: Intel: fix unused-variable warning in probe_codec
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+
+commit 515626a33a194c4caaf2879dbf9e00e882582af0 upstream.
+
+In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n,
+gcc warns about an unused variable:
+
+sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
+sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable]
+ struct skl_dev *skl = bus_to_skl(bus);
+ ^~~
+cc1: all warnings being treated as errors
+
+Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation")
+Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
+Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Link: https://lore.kernel.org/r/20220822035133.2147381-1-cuigaosheng1@huawei.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/intel/skylake/skl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/intel/skylake/skl.c
++++ b/sound/soc/intel/skylake/skl.c
+@@ -726,8 +726,8 @@ static int probe_codec(struct hdac_bus *
+ unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) |
+ (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
+ unsigned int res = -1;
+- struct skl_dev *skl = bus_to_skl(bus);
+ #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC)
++ struct skl_dev *skl = bus_to_skl(bus);
+ struct hdac_hda_priv *hda_codec;
+ #endif
+ struct hda_codec *codec;
--- /dev/null
+From 0e213813df02da048ffd22a2c4fac041768ca327 Mon Sep 17 00:00:00 2001
+From: Yang Yingliang <yangyingliang@huawei.com>
+Date: Thu, 20 Oct 2022 18:59:37 +0800
+Subject: ASoC: Intel: Skylake: fix possible memory leak in skl_codec_device_init()
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+commit 0e213813df02da048ffd22a2c4fac041768ca327 upstream.
+
+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: e4746d94d00c ("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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/intel/skylake/skl.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+--- a/sound/soc/intel/skylake/skl.c
++++ b/sound/soc/intel/skylake/skl.c
+@@ -689,11 +689,6 @@ static void load_codec_module(struct hda
+
+ #endif /* CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC */
+
+-static void skl_codec_device_exit(struct device *dev)
+-{
+- snd_hdac_device_exit(dev_to_hdac_dev(dev));
+-}
+-
+ static struct hda_codec *skl_codec_device_init(struct hdac_bus *bus, int addr)
+ {
+ struct hda_codec *codec;
+@@ -706,12 +701,11 @@ static struct hda_codec *skl_codec_devic
+ }
+
+ codec->core.type = HDA_DEV_ASOC;
+- codec->core.dev.release = skl_codec_device_exit;
+
+ ret = snd_hdac_device_register(&codec->core);
+ if (ret) {
+ dev_err(bus->dev, "failed to register hdac device\n");
+- snd_hdac_device_exit(&codec->core);
++ put_device(&codec->core.dev);
+ return ERR_PTR(ret);
+ }
+
--- /dev/null
+From 1cda83e42bf66beb06bf61c7a78951ec0c028898 Mon Sep 17 00:00:00 2001
+From: Cezary Rojewski <cezary.rojewski@intel.com>
+Date: Fri, 19 Aug 2022 14:47:40 +0200
+Subject: ASoC: SOF: Fix compilation when HDA_AUDIO_CODEC config is disabled
+
+From: Cezary Rojewski <cezary.rojewski@intel.com>
+
+commit 1cda83e42bf66beb06bf61c7a78951ec0c028898 upstream.
+
+hda_codec_device_init() expects three parameters, not two.
+
+Fixes: 3fd63658caed ("ASoC: Intel: Drop hdac_ext usage for codec device creation")
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Acked-by: Mark Brown <broonie@kernel.org>
+Link: https://lore.kernel.org/r/20220819124740.3564862-1-cezary.rojewski@intel.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/sof/intel/hda-codec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/sof/intel/hda-codec.c
++++ b/sound/soc/sof/intel/hda-codec.c
+@@ -213,7 +213,7 @@ out:
+ put_device(&codec->core.dev);
+ }
+ #else
+- codec = hda_codec_device_init(&hbus->core, address);
++ codec = hda_codec_device_init(&hbus->core, address, HDA_DEV_ASOC);
+ ret = PTR_ERR_OR_ZERO(codec);
+ #endif
+
--- /dev/null
+From e9441675edc1bb8dbfadacf68aafacca60d65a25 Mon Sep 17 00:00:00 2001
+From: Yang Yingliang <yangyingliang@huawei.com>
+Date: Thu, 20 Oct 2022 19:01:57 +0800
+Subject: ASoC: SOF: Intel: hda-codec: fix possible memory leak in hda_codec_device_init()
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+commit e9441675edc1bb8dbfadacf68aafacca60d65a25 upstream.
+
+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: 829c67319806 ("ASoC: SOF: Intel: Introduce HDA codec init and exit routines")
+Fixes: dfe66a18780d ("ALSA: hdac_ext: add extended HDA bus")
+Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
+Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
+Link: https://lore.kernel.org/r/20221020110157.1450191-1-yangyingliang@huawei.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/sof/intel/hda-codec.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+--- a/sound/soc/sof/intel/hda-codec.c
++++ b/sound/soc/sof/intel/hda-codec.c
+@@ -109,11 +109,6 @@ EXPORT_SYMBOL_NS(hda_codec_jack_check, S
+ #define is_generic_config(x) 0
+ #endif
+
+-static void hda_codec_device_exit(struct device *dev)
+-{
+- snd_hdac_device_exit(dev_to_hdac_dev(dev));
+-}
+-
+ static struct hda_codec *hda_codec_device_init(struct hdac_bus *bus, int addr, int type)
+ {
+ struct hda_codec *codec;
+@@ -126,12 +121,11 @@ static struct hda_codec *hda_codec_devic
+ }
+
+ codec->core.type = type;
+- codec->core.dev.release = hda_codec_device_exit;
+
+ ret = snd_hdac_device_register(&codec->core);
+ if (ret) {
+ dev_err(bus->dev, "failed to register hdac device\n");
+- snd_hdac_device_exit(&codec->core);
++ put_device(&codec->core.dev);
+ return ERR_PTR(ret);
+ }
+
mm-correctly-charge-compressed-memory-to-its-memcg.patch
loongarch-clear-fpu-simd-thread-info-flags-for-kernel-thread.patch
loongarch-set-_page_dirty-only-if-_page_write-is-set-in-pmd-pte-_mkdirty.patch
+asoc-sof-fix-compilation-when-hda_audio_codec-config-is-disabled.patch
+asoc-intel-fix-unused-variable-warning-in-probe_codec.patch
+asoc-intel-skylake-fix-possible-memory-leak-in-skl_codec_device_init.patch
+asoc-sof-intel-hda-codec-fix-possible-memory-leak-in-hda_codec_device_init.patch