From 4d41c74dcb6778ae92d985e4d32055345c3a1fed Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Fri, 9 Dec 2016 09:57:41 +0000 Subject: [PATCH] ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path buf was allocated by kzalloc() so it should be passed to kfree() Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index ff111a82fa3f..593b7d1aed46 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -187,7 +187,7 @@ static struct wm_adsp_buf *wm_adsp_buf_alloc(const void *src, size_t len, buf->buf = vmalloc(len); if (!buf->buf) { - vfree(buf); + kfree(buf); return NULL; } memcpy(buf->buf, src, len); -- 2.20.1