Skip to content

Commit

Permalink
ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path
Browse files Browse the repository at this point in the history
buf was allocated by kzalloc() so it should be passed to kfree()

Signed-off-by: Richard Fitzgerald <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Richard Fitzgerald authored and broonie committed Dec 12, 2016
1 parent 35f4403 commit 4d41c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d41c74

Please sign in to comment.