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 <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Richard Fitzgerald 2016-12-09 09:57:41 +00:00 committed by Mark Brown
parent 35f4403edb
commit 4d41c74dcb
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ static struct wm_adsp_buf *wm_adsp_buf_alloc(const void *src, size_t len,
buf->buf = vmalloc(len); buf->buf = vmalloc(len);
if (!buf->buf) { if (!buf->buf) {
vfree(buf); kfree(buf);
return NULL; return NULL;
} }
memcpy(buf->buf, src, len); memcpy(buf->buf, src, len);