]> git.proxmox.com Git - mirror_qemu.git/commit
ohci: check device is not NULL before calling usb_ep_get()
authorLiam Merwick <liam.merwick@oracle.com>
Wed, 6 Feb 2019 13:36:52 +0000 (13:36 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 20 Feb 2019 08:41:23 +0000 (09:41 +0100)
commit42340fc31f1533207bfd53f9d922624c4fbcf91d
tree5078bd60b99d4114293fc2ba2779971277aab0c9
parente94682f1febe3cc95cbe144137dd35eae39dc1e0
ohci: check device is not NULL before calling usb_ep_get()

A call to ohci_find_device() can return NULL if it doesn't find a
device matching 'addr' so for the two callers, explicitly check
the return value before passing it to usb_ep_get().

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
Message-id: 1549460216-25808-6-git-send-email-liam.merwick@oracle.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-ohci.c