From cf44a136c062098b099a44698291e50c5bfdce2e Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 4 Jun 2014 15:25:33 +0900 Subject: ALSA: fireworks: Use safer way to arrange ring buffer pointer To reverse a pointer for the ring buffer, subtraction by buffer size is better than assignment to the beginning of the buffer. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- sound/firewire/fireworks/fireworks_hwdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/firewire/fireworks/fireworks_hwdep.c') diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c index 4f8216fb6b62..33df8655fe81 100644 --- a/sound/firewire/fireworks/fireworks_hwdep.c +++ b/sound/firewire/fireworks/fireworks_hwdep.c @@ -58,7 +58,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained, efw->pull_ptr += till_end; if (efw->pull_ptr >= efw->resp_buf + snd_efw_resp_buf_size) - efw->pull_ptr = efw->resp_buf; + efw->pull_ptr -= snd_efw_resp_buf_size; length -= till_end; buf += till_end; -- cgit v1.2.3