From: Sasha Levin Date: Sat, 21 Oct 2023 20:45:38 +0000 (-0400) Subject: Fixes for 5.4 X-Git-Tag: v4.14.328~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3531879028383290b486afec029affe2a753b90a;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/asoc-pxa-fix-a-memory-leak-in-probe.patch b/queue-5.4/asoc-pxa-fix-a-memory-leak-in-probe.patch new file mode 100644 index 00000000000..4ac18512520 --- /dev/null +++ b/queue-5.4/asoc-pxa-fix-a-memory-leak-in-probe.patch @@ -0,0 +1,36 @@ +From 0714741d7b32e7d6cffa1c8d54d401e2872020fd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 5 Oct 2023 17:00:24 +0300 +Subject: ASoC: pxa: fix a memory leak in probe() + +From: Dan Carpenter + +[ 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 +Link: https://lore.kernel.org/r/84ac2313-1420-471a-b2cb-3269a2e12a7c@moroto.mountain +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + 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 5fdd1a24c232d..ff3db623c476d 100644 +--- a/sound/soc/pxa/pxa-ssp.c ++++ b/sound/soc/pxa/pxa-ssp.c +@@ -797,7 +797,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 + diff --git a/queue-5.4/series b/queue-5.4/series index d312ab0c85c..22d6b9c931c 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -113,3 +113,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