Skip to content

Commit aa6464e

Browse files
Dan Carpenterbroonie
authored andcommitted
ASoC: pxa: fix a memory leak in probe()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent af5fd12 commit aa6464e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/pxa/pxa-ssp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai)
773773
if (IS_ERR(priv->extclk)) {
774774
ret = PTR_ERR(priv->extclk);
775775
if (ret == -EPROBE_DEFER)
776-
return ret;
776+
goto err_priv;
777777

778778
priv->extclk = NULL;
779779
}

0 commit comments

Comments
 (0)