Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232605
b: refs/heads/master
c: 7606ee8
h: refs/heads/master
i:
  232603: 6ed9c9e
v: v3
  • Loading branch information
Max Vozeler authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent 96cf6d2 commit a8015a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d8f4595d1f275f424a8920bb2563fc547661213
refs/heads/master: 7606ee8aa33287dd3e6eb44c78541b87a413a325
13 changes: 10 additions & 3 deletions trunk/drivers/staging/usbip/vhci_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,9 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
dev_info(dev, "SetAddress Request (%d) to port %d\n",
ctrlreq->wValue, vdev->rhport);

vdev->udev = urb->dev;
if (vdev->udev)
usb_put_dev(vdev->udev);
vdev->udev = usb_get_dev(urb->dev);

spin_lock(&vdev->ud.lock);
vdev->ud.status = VDEV_ST_USED;
Expand All @@ -627,8 +629,9 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
"Get_Descriptor to device 0 "
"(get max pipe size)\n");

/* FIXME: reference count? (usb_get_dev()) */
vdev->udev = urb->dev;
if (vdev->udev)
usb_put_dev(vdev->udev);
vdev->udev = usb_get_dev(urb->dev);
goto out;

default:
Expand Down Expand Up @@ -887,6 +890,10 @@ static void vhci_device_reset(struct usbip_device *ud)
vdev->speed = 0;
vdev->devid = 0;

if (vdev->udev)
usb_put_dev(vdev->udev);
vdev->udev = NULL;

ud->tcp_socket = NULL;

ud->status = VDEV_ST_NULL;
Expand Down

0 comments on commit a8015a5

Please sign in to comment.