diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-01-10 14:33:23 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-01-14 12:47:11 +0100 |
commit | cc8d2b65c7e5f44172bf3ec300407522162e9a7f (patch) | |
tree | 4b7667962a605a301bd5f5b87c0a77de3152c55e /hw/usb | |
parent | 0cb41e2c5ebc1f8fa180a1726981416fee9abad1 (diff) |
ehci: Assert state machine is sane w.r.t. EHCIQueue
Coverity worries the EHCIQueue pointer could be null when we pass it
to functions that reference it. The state machine ensures it can't be
null then. Assert that, to hush the checker.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/hcd-ehci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 320b7e7239..70406592ef 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2092,18 +2092,22 @@ static void ehci_advance_state(EHCIState *ehci, int async) break; case EST_ADVANCEQUEUE: + assert(q != NULL); again = ehci_state_advqueue(q); break; case EST_FETCHQTD: + assert(q != NULL); again = ehci_state_fetchqtd(q); break; case EST_HORIZONTALQH: + assert(q != NULL); again = ehci_state_horizqh(q); break; case EST_EXECUTE: + assert(q != NULL); again = ehci_state_execute(q); if (async) { ehci->async_stepdown = 0; |