mirror of
https://github.com/mborgerson/xemu.git
synced 2026-03-30 02:03:17 +00:00
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20170717-pull-request' into staging
ehci fix for 2.10 # gpg: Signature made Mon 17 Jul 2017 10:40:00 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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/usb-20170717-pull-request: ehci: add sanity check for maxframes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@ -2483,6 +2483,11 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)
|
||||
NB_PORTS);
|
||||
return;
|
||||
}
|
||||
if (s->maxframes < 8 || s->maxframes > 512) {
|
||||
error_setg(errp, "maxframes %d out if range (8 .. 512)",
|
||||
s->maxframes);
|
||||
return;
|
||||
}
|
||||
|
||||
usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ?
|
||||
&ehci_bus_ops_companion : &ehci_bus_ops_standalone, dev);
|
||||
|
||||
Reference in New Issue
Block a user