diff mbox

ASoC: pxa: pxa-ssp: small leak in probe()

Message ID 20140731125751.GA31539@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter July 31, 2014, 12:57 p.m. UTC
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>

Comments

Mark Brown July 31, 2014, 7:27 p.m. UTC | #1
On Thu, Jul 31, 2014 at 03:57:51PM +0300, Dan Carpenter wrote:
> There is a small memory leak if probe() fails.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 199a8b3..0109f6c2 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -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");