summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2019-04-02 15:49:15 +0300
committerMark Brown <broonie@kernel.org>2019-04-03 07:04:14 +0300
commit26ffa016a3c1b34fbfcc8368edb315f2829504ae (patch)
tree34d893d83b30f9e80ff01758660f5a62fc4e04e8 /sound/soc/codecs/wm_adsp.c
parent7742a5b418c91b1f27a08ebf90cb662cf4c06604 (diff)
downloadlinux-26ffa016a3c1b34fbfcc8368edb315f2829504ae.tar.xz
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/soc/codecs/wm_adsp.c')
-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);