]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Sat, 21 Oct 2023 20:45:40 +0000 (16:45 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 21 Oct 2023 20:45:40 +0000 (16:45 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/asoc-pxa-fix-a-memory-leak-in-probe.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/asoc-pxa-fix-a-memory-leak-in-probe.patch b/queue-4.19/asoc-pxa-fix-a-memory-leak-in-probe.patch
new file mode 100644 (file)
index 0000000..159ac49
--- /dev/null
@@ -0,0 +1,36 @@
+From f4c01440bf7cb7d40de6feb5344d19b0f0685ffd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 5 Oct 2023 17:00:24 +0300
+Subject: ASoC: pxa: fix a memory leak in probe()
+
+From: Dan Carpenter <dan.carpenter@linaro.org>
+
+[ Upstream commit aa6464edbd51af4a2f8db43df866a7642b244b5f ]
+
+Free the "priv" pointer before returning the error code.
+
+Fixes: 90eb6b59d311 ("ASoC: pxa-ssp: add support for an external clock in devicetree")
+Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
+Link: https://lore.kernel.org/r/84ac2313-1420-471a-b2cb-3269a2e12a7c@moroto.mountain
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/pxa/pxa-ssp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
+index 69033e1a84e6a..49481dadb9230 100644
+--- a/sound/soc/pxa/pxa-ssp.c
++++ b/sound/soc/pxa/pxa-ssp.c
+@@ -795,7 +795,7 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai)
+               if (IS_ERR(priv->extclk)) {
+                       ret = PTR_ERR(priv->extclk);
+                       if (ret == -EPROBE_DEFER)
+-                              return ret;
++                              goto err_priv;
+                       priv->extclk = NULL;
+               }
+-- 
+2.42.0
+
index 5582f150dc31b0b5be3b8c41f3d023a29d98fad5..60d895ef5b706626e36ab0116b469e045c1914fd 100644 (file)
@@ -95,3 +95,4 @@ usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch
 perf-disallow-mis-matched-inherited-group-reads.patch
 s390-pci-fix-iommu-bitmap-allocation.patch
 gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch
+asoc-pxa-fix-a-memory-leak-in-probe.patch