From: Charles Keepax Date: Tue, 2 Apr 2019 12:49:15 +0000 (+0100) Subject: ASoC: wm_adsp: Remove redundant NULL check in wm_adsp_buffer_free X-Git-Tag: v5.2-rc1~16^2~9^2~210 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=26ffa016a3c1b34fbfcc8368edb315f2829504ae;p=uclinux-h8%2Flinux.git 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 Signed-off-by: Mark Brown --- 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);