]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
authorSasha Levin <sashal@kernel.org>
Mon, 17 Mar 2025 14:33:55 +0000 (10:33 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 17 Mar 2025 14:33:55 +0000 (10:33 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/asoc-codecs-wm0010-fix-error-handling-path-in-wm0010.patch [new file with mode: 0644]
queue-5.10/drm-gma500-add-null-check-for-pci_gfx_root-in-mid_ge.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/asoc-codecs-wm0010-fix-error-handling-path-in-wm0010.patch b/queue-5.10/asoc-codecs-wm0010-fix-error-handling-path-in-wm0010.patch
new file mode 100644 (file)
index 0000000..4fff5c2
--- /dev/null
@@ -0,0 +1,59 @@
+From a6a53f8a77e3d9556c0f70fb0a6d73a53fa72819 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 10 Mar 2025 18:45:36 +0100
+Subject: ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+[ Upstream commit ed92bc5264c4357d4fca292c769ea9967cd3d3b6 ]
+
+Free some resources in the error handling path of the probe, as already
+done in the remove function.
+
+Fixes: e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver")
+Fixes: fd8b96574456 ("ASoC: wm0010: Clear IRQ as wake source and include missing header")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
+Link: https://patch.msgid.link/5139ba1ab8c4c157ce04e56096a0f54a1683195c.1741549792.git.christophe.jaillet@wanadoo.fr
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/wm0010.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
+index 28b4656c4e149..b2f87af1bfc87 100644
+--- a/sound/soc/codecs/wm0010.c
++++ b/sound/soc/codecs/wm0010.c
+@@ -952,7 +952,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
+       if (ret) {
+               dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
+                       irq, ret);
+-              return ret;
++              goto free_irq;
+       }
+       if (spi->max_speed_hz)
+@@ -964,9 +964,18 @@ static int wm0010_spi_probe(struct spi_device *spi)
+                                    &soc_component_dev_wm0010, wm0010_dai,
+                                    ARRAY_SIZE(wm0010_dai));
+       if (ret < 0)
+-              return ret;
++              goto disable_irq_wake;
+       return 0;
++
++disable_irq_wake:
++      irq_set_irq_wake(wm0010->irq, 0);
++
++free_irq:
++      if (wm0010->irq)
++              free_irq(wm0010->irq, wm0010);
++
++      return ret;
+ }
+ static int wm0010_spi_remove(struct spi_device *spi)
+-- 
+2.39.5
+
diff --git a/queue-5.10/drm-gma500-add-null-check-for-pci_gfx_root-in-mid_ge.patch b/queue-5.10/drm-gma500-add-null-check-for-pci_gfx_root-in-mid_ge.patch
new file mode 100644 (file)
index 0000000..8cae4d8
--- /dev/null
@@ -0,0 +1,47 @@
+From dc141593ce4fa2eb68cf0834744fb5bba541827b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 6 Mar 2025 14:20:45 +0300
+Subject: drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data()
+
+From: Ivan Abramov <i.abramov@mt-integration.ru>
+
+[ Upstream commit 9af152dcf1a06f589f44a74da4ad67e365d4db9a ]
+
+Since pci_get_domain_bus_and_slot() can return NULL, add NULL check for
+pci_gfx_root in the mid_get_vbt_data().
+
+This change is similar to the checks implemented in mid_get_fuse_settings()
+and mid_get_pci_revID(), which were introduced by commit 0cecdd818cd7
+("gma500: Final enables for Oaktrail") as "additional minor
+bulletproofing".
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Fixes: f910b411053f ("gma500: Add the glue to the various BIOS and firmware interfaces")
+Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
+Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20250306112046.17144-1-i.abramov@mt-integration.ru
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/gma500/mid_bios.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c
+index 8ab44fec4bfa4..b76b86278e0e3 100644
+--- a/drivers/gpu/drm/gma500/mid_bios.c
++++ b/drivers/gpu/drm/gma500/mid_bios.c
+@@ -277,6 +277,11 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
+                                           0, PCI_DEVFN(2, 0));
+       int ret = -1;
++      if (pci_gfx_root == NULL) {
++              WARN_ON(1);
++              return;
++      }
++
+       /* Get the address of the platform config vbt */
+       pci_read_config_dword(pci_gfx_root, 0xFC, &addr);
+       pci_dev_put(pci_gfx_root);
+-- 
+2.39.5
+
index acb8e0994bba68a134ba5354c7103cf3824cb087..35eeeaba9c314c6d943d5660ad5f79151e50acf7 100644 (file)
@@ -54,3 +54,5 @@ drm-atomic-filter-out-redundant-dpms-calls.patch
 drm-amd-display-assign-normalized_pix_clk-when-color-depth-14.patch
 drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch
 qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch
+drm-gma500-add-null-check-for-pci_gfx_root-in-mid_ge.patch
+asoc-codecs-wm0010-fix-error-handling-path-in-wm0010.patch