Skip to content

Commit

Permalink
ASoC: pxa: fix a memory leak in probe()
Browse files Browse the repository at this point in the history
Free the "priv" pointer before returning the error code.

Fixes: 90eb6b5 ("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>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Oct 9, 2023
1 parent af5fd12 commit aa6464e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/pxa/pxa-ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit aa6464e

Please sign in to comment.