diff options
Diffstat (limited to 'drivers/usb/usbip/vhci_hcd.c')
-rw-r--r-- | drivers/usb/usbip/vhci_hcd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c index f46ee1fefe02..000ab7225717 100644 --- a/drivers/usb/usbip/vhci_hcd.c +++ b/drivers/usb/usbip/vhci_hcd.c | |||
@@ -508,6 +508,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
508 | case USB_PORT_FEAT_U1_TIMEOUT: | 508 | case USB_PORT_FEAT_U1_TIMEOUT: |
509 | usbip_dbg_vhci_rh( | 509 | usbip_dbg_vhci_rh( |
510 | " SetPortFeature: USB_PORT_FEAT_U1_TIMEOUT\n"); | 510 | " SetPortFeature: USB_PORT_FEAT_U1_TIMEOUT\n"); |
511 | /* Fall through */ | ||
511 | case USB_PORT_FEAT_U2_TIMEOUT: | 512 | case USB_PORT_FEAT_U2_TIMEOUT: |
512 | usbip_dbg_vhci_rh( | 513 | usbip_dbg_vhci_rh( |
513 | " SetPortFeature: USB_PORT_FEAT_U2_TIMEOUT\n"); | 514 | " SetPortFeature: USB_PORT_FEAT_U2_TIMEOUT\n"); |
@@ -654,15 +655,9 @@ error: | |||
654 | static void vhci_tx_urb(struct urb *urb, struct vhci_device *vdev) | 655 | static void vhci_tx_urb(struct urb *urb, struct vhci_device *vdev) |
655 | { | 656 | { |
656 | struct vhci_priv *priv; | 657 | struct vhci_priv *priv; |
657 | struct vhci_hcd *vhci_hcd; | 658 | struct vhci_hcd *vhci_hcd = vdev_to_vhci_hcd(vdev); |
658 | unsigned long flags; | 659 | unsigned long flags; |
659 | 660 | ||
660 | if (!vdev) { | ||
661 | pr_err("could not get virtual device"); | ||
662 | return; | ||
663 | } | ||
664 | vhci_hcd = vdev_to_vhci_hcd(vdev); | ||
665 | |||
666 | priv = kzalloc(sizeof(struct vhci_priv), GFP_ATOMIC); | 661 | priv = kzalloc(sizeof(struct vhci_priv), GFP_ATOMIC); |
667 | if (!priv) { | 662 | if (!priv) { |
668 | usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_MALLOC); | 663 | usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_MALLOC); |