summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2019-04-02 13:49:15 +0100
committerMark Brown <broonie@kernel.org>2019-04-03 11:04:14 +0700
commit26ffa016a3c1b34fbfcc8368edb315f2829504ae (patch)
tree34d893d83b30f9e80ff01758660f5a62fc4e04e8 /sound
parent7742a5b418c91b1f27a08ebf90cb662cf4c06604 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_adsp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 0aa62b26f61c..6145260d89bf 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -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);