From 6c5bfae45b8528ece93a940c1e392cd8009ed356 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 21 Oct 2023 16:45:40 -0400 Subject: [PATCH] Fixes for 4.19 Signed-off-by: Sasha Levin --- .../asoc-pxa-fix-a-memory-leak-in-probe.patch | 36 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 37 insertions(+) create mode 100644 queue-4.19/asoc-pxa-fix-a-memory-leak-in-probe.patch 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 index 00000000000..159ac49104b --- /dev/null +++ b/queue-4.19/asoc-pxa-fix-a-memory-leak-in-probe.patch @@ -0,0 +1,36 @@ +From f4c01440bf7cb7d40de6feb5344d19b0f0685ffd 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 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 + diff --git a/queue-4.19/series b/queue-4.19/series index 5582f150dc3..60d895ef5b7 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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 -- 2.47.3