diff options
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r-- | drivers/staging/usbip/stub_dev.c | 4 | ||||
-rw-r--r-- | drivers/staging/usbip/stub_rx.c | 1 | ||||
-rw-r--r-- | drivers/staging/usbip/stub_tx.c | 1 | ||||
-rw-r--r-- | drivers/staging/usbip/vhci_hcd.c | 8 |
4 files changed, 3 insertions, 11 deletions
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index d36c69e..ca5de9d 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -286,10 +286,8 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev, /* yes, it's a new device */ sdev = kzalloc(sizeof(struct stub_device), GFP_KERNEL); - if (!sdev) { - dev_err(&interface->dev, "no memory for stub_device\n"); + if (!sdev) return NULL; - } sdev->interface = usb_get_intf(interface); sdev->udev = usb_get_dev(udev); diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index e7458e1..715e8a7 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c @@ -485,7 +485,6 @@ static void stub_recv_cmd_submit(struct stub_device *sdev, kzalloc(pdu->u.cmd_submit.transfer_buffer_length, GFP_KERNEL); if (!priv->urb->transfer_buffer) { - dev_err(&sdev->interface->dev, "malloc x_buff\n"); usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC); return; } diff --git a/drivers/staging/usbip/stub_tx.c b/drivers/staging/usbip/stub_tx.c index 513961f..cd5326a 100644 --- a/drivers/staging/usbip/stub_tx.c +++ b/drivers/staging/usbip/stub_tx.c @@ -42,7 +42,6 @@ void stub_enqueue_ret_unlink(struct stub_device *sdev, __u32 seqnum, unlink = kzalloc(sizeof(struct stub_unlink), GFP_ATOMIC); if (!unlink) { - dev_err(&sdev->interface->dev, "alloc stub_unlink\n"); usbip_event_add(&sdev->ud, VDEV_EVENT_ERROR_MALLOC); return; } diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 216648d..f1ca084 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -434,16 +434,13 @@ static void vhci_tx_urb(struct urb *urb) } priv = kzalloc(sizeof(struct vhci_priv), GFP_ATOMIC); - - spin_lock(&vdev->priv_lock); - if (!priv) { - dev_err(&urb->dev->dev, "malloc vhci_priv\n"); - spin_unlock(&vdev->priv_lock); usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_MALLOC); return; } + spin_lock(&vdev->priv_lock); + priv->seqnum = atomic_inc_return(&the_controller->seqnum); if (priv->seqnum == 0xffff) dev_info(&urb->dev->dev, "seqnum max\n"); @@ -684,7 +681,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) /* setup CMD_UNLINK pdu */ unlink = kzalloc(sizeof(struct vhci_unlink), GFP_ATOMIC); if (!unlink) { - pr_err("malloc vhci_unlink\n"); spin_unlock(&vdev->priv_lock); spin_unlock(&the_controller->lock); usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_MALLOC); |