]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: wm_adsp: Remove redundant NULL check in wm_adsp_buffer_free
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 2 Apr 2019 12:49:15 +0000 (13:49 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 3 Apr 2019 04:04:14 +0000 (11:04 +0700)
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>
sound/soc/codecs/wm_adsp.c

index 0aa62b26f61cc7b7073d39f2fc5c767e11eeac73..6145260d89bfae4d87519305063bff1a55e0dedd 100644 (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);