ASoC: pxa: pxa-ssp: small leak in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 31 Jul 2014 12:57:51 +0000 (15:57 +0300)
committerMark Brown <broonie@linaro.org>
Thu, 31 Jul 2014 19:27:03 +0000 (20:27 +0100)
There is a small memory leak if probe() fails.

Fixes: 2023c90c3a2c ('ASoC: pxa: pxa-ssp: add DT bindings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/pxa/pxa-ssp.c

index 199a8b3775531c9e0ac559aeac13c848d4409fc1..0109f6c2334e528e757b0f128fbf2dddbd3f29de 100644 (file)
@@ -723,7 +723,8 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai)
                ssp_handle = of_parse_phandle(dev->of_node, "port", 0);
                if (!ssp_handle) {
                        dev_err(dev, "unable to get 'port' phandle\n");
-                       return -ENODEV;
+                       ret = -ENODEV;
+                       goto err_priv;
                }
 
                priv->ssp = pxa_ssp_request_of(ssp_handle, "SoC audio");