diff mbox series

[3/3] ASoC: wm_adsp: Make use of local variables

Message ID 20190402124916.28736-3-ckeepax@opensource.cirrus.com (mailing list archive)
State Accepted
Commit 789b930a8f0de609fd2ef9f2ebf73726b7087fea
Headers show
Series [1/3] ASoC: wm_adsp: Check for buffer in trigger stop | expand

Commit Message

Charles Keepax April 2, 2019, 12:49 p.m. UTC
Tidy up some instances of dereferencing to obtain things that are
already stored in local variables.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/codecs/wm_adsp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 4223186594b4d..c8c49d5b8ac95 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -3381,7 +3381,7 @@  static int wm_adsp_compr_attach(struct wm_adsp_compr *compr)
 		return -EINVAL;
 
 	compr->buf = buf;
-	compr->buf->compr = compr;
+	buf->compr = compr;
 
 	return 0;
 }
@@ -4092,7 +4092,7 @@  int wm_adsp_compr_pointer(struct snd_compr_stream *stream,
 
 	buf = compr->buf;
 
-	if (!compr->buf || compr->buf->error) {
+	if (!buf || buf->error) {
 		snd_compr_stop_error(stream, SNDRV_PCM_STATE_XRUN);
 		ret = -EIO;
 		goto out;
@@ -4112,7 +4112,7 @@  int wm_adsp_compr_pointer(struct snd_compr_stream *stream,
 		if (buf->avail < wm_adsp_compr_frag_words(compr)) {
 			ret = wm_adsp_buffer_get_error(buf);
 			if (ret < 0) {
-				if (compr->buf->error)
+				if (buf->error)
 					snd_compr_stop_error(stream,
 							SNDRV_PCM_STATE_XRUN);
 				goto out;