ASoC: wm_adsp: Remove redundant NULL check in wm_adsp_buffer_free

wm_adsp_compr_detach is NULL aware so there is no need to check for NULL
before calling it, remove the redundant check.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Charles Keepax 2019-04-02 13:49:15 +01:00 committed by Mark Brown
parent 7742a5b418
commit 26ffa016a3
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -3887,8 +3887,7 @@ static int wm_adsp_buffer_free(struct wm_adsp *dsp)
struct wm_adsp_compr_buf *buf, *tmp;
list_for_each_entry_safe(buf, tmp, &dsp->buffer_list, list) {
if (buf->compr)
wm_adsp_compr_detach(buf->compr);
wm_adsp_compr_detach(buf->compr);
kfree(buf->name);
kfree(buf->regions);