summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-10-05 17:00:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-25 11:17:02 +0200
commit4daaa482fba067b453075f011842ccf81128dcbd (patch)
tree6ab5aeb407bd77c8c9561fc4da6d7f96485b7e0e /sound
parent450aac072e0f10c9ecc1c1d9d5d33811739a3cae (diff)
downloadlinux-stable-4daaa482fba067b453075f011842ccf81128dcbd.tar.gz
linux-stable-4daaa482fba067b453075f011842ccf81128dcbd.tar.bz2
linux-stable-4daaa482fba067b453075f011842ccf81128dcbd.zip
ASoC: pxa: fix a memory leak in probe()
[ 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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/pxa/pxa-ssp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 69033e1a84e6..49481dadb923 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;
}