OSDN Git Service

hcd-musb: fix dereference null return value
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Nov 2014 10:57:23 +0000 (11:57 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Nov 2014 17:02:31 +0000 (18:02 +0100)
commita9be76576e375a994bbcea0a5eb2a3852969de0e
treebb348d7541b01621b68375a4a84dcac0eb2c966f
parentfae38221e78fc9f847965f6d18b359b8044df348
hcd-musb: fix dereference null return value

usb_ep_get and usb_handle_packet can deal with a NULL device, but we have
to avoid dereferencing NULL pointers when building the id.

Thanks to Gonglei for an initial stab at fixing this.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/usb/hcd-musb.c