diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-01-10 18:45:23 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-01-10 18:45:23 +0000 |
commit | 291741033f611a4f0bbce3f7c9dead84ce315f96 (patch) | |
tree | a18e38d6663926b2f042a80b3f7b4c63d1c0c926 | |
parent | a311f891abf3833c1e4c5a62a6e5b0f1b81f22c3 (diff) | |
parent | a7fde1c1706a93c304eb301cc290d71c9426493b (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/audio-20190110-pull-request' into staging
audio: two fixes.
# gpg: Signature made Thu 10 Jan 2019 09:23:24 GMT
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/audio-20190110-pull-request:
usb-audio: ignore usb packages with wrong size
hw/audio/marvell: Don't include unnecessary i2c.h header file
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/usb/dev-audio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ee43e4914d..28ac7c5165 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -321,6 +321,9 @@ static int streambuf_put(struct streambuf *buf, USBPacket *p) if (!free) { return 0; } + if (p->iov.size != USBAUDIO_PACKET_SIZE) { + return 0; + } assert(free >= USBAUDIO_PACKET_SIZE); usb_packet_copy(p, buf->data + (buf->prod % buf->size), USBAUDIO_PACKET_SIZE); |