You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
commiteb9d84b0ffupstream. ALSA fireworks driver has a bug in its initial state to return count shorter than expected by 4 bytes to userspace applications when handling response frame for Echo Audio Fireworks transaction. It's due to missing addition of the size for the type of event in ALSA firewire stack. Fixes:555e8a8f7f("ALSA: fireworks: Add command/response functionality into hwdep interface") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20220424102428.21109-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
03ab174805
commit
2906c73632
@@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
|
||||
type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE;
|
||||
if (copy_to_user(buf, &type, sizeof(type)))
|
||||
return -EFAULT;
|
||||
count += sizeof(type);
|
||||
remained -= sizeof(type);
|
||||
buf += sizeof(type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user