From: Peter Maydell <peter.maydell@linaro.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] ehci: add sanity check for maxframes
Date: Mon, 3 Jul 2017 12:32:39 +0100 [thread overview]
Message-ID: <CAFEAcA_u9_jdyDRDb089n3swLsboaV8QfdojLaN5aZLZ69zDPw@mail.gmail.com> (raw)
In-Reply-To: <20170703111549.10924-1-kraxel@redhat.com>
On 3 July 2017 at 12:15, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/usb/hcd-ehci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
> index 73090e01ad..604912cb3e 100644
> --- a/hw/usb/hcd-ehci.c
> +++ b/hw/usb/hcd-ehci.c
> @@ -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);
Typo: should be "of".
> + return;
> + }
>
> usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ?
> &ehci_bus_ops_companion : &ehci_bus_ops_standalone, dev);
> --
> 2.9.3
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Do we want something similar for hcd-uhci just for consistency?
thanks
-- PMM
prev parent reply other threads:[~2017-07-03 11:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 11:15 [Qemu-devel] [PATCH] ehci: add sanity check for maxframes Gerd Hoffmann
2017-07-03 11:32 ` Peter Maydell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA_u9_jdyDRDb089n3swLsboaV8QfdojLaN5aZLZ69zDPw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).