Commit aa6464ed authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: pxa: fix a memory leak in probe()

Free the "priv" pointer before returning the error code.

Fixes: 90eb6b59 ("ASoC: pxa-ssp: add support for an external clock in devicetree")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/84ac2313-1420-471a-b2cb-3269a2e12a7c@moroto.mountainSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent af5fd122
......@@ -773,7 +773,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment