Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142433
b: refs/heads/master
c: a878440
h: refs/heads/master
i:
  142431: 71198aa
v: v3
  • Loading branch information
Janne Grunau authored and Mauro Carvalho Chehab committed Apr 7, 2009
1 parent f7fa8bd commit 5455c23
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 6e7f7b37e719746da67ecfc54a264783d473ca05
refs/heads/master: a878440d994e11bc3e4eb81d378b32fa32e9d80c
8 changes: 5 additions & 3 deletions trunk/drivers/media/video/usbvision/usbvision-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,8 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
* Returns NULL on error, a pointer to usb_usbvision else.
*
*/
static struct usb_usbvision *usbvision_alloc(struct usb_device *dev)
static struct usb_usbvision *usbvision_alloc(struct usb_device *dev,
struct usb_interface *intf)
{
struct usb_usbvision *usbvision;

Expand All @@ -1531,7 +1532,7 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev)
return NULL;

usbvision->dev = dev;
if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev))
if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev))
goto err_free;

mutex_init(&usbvision->lock); /* available */
Expand Down Expand Up @@ -1669,7 +1670,8 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
return -ENODEV;
}

if ((usbvision = usbvision_alloc(dev)) == NULL) {
usbvision = usbvision_alloc(dev, intf);
if (usbvision == NULL) {
dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__);
return -ENOMEM;
}
Expand Down

0 comments on commit 5455c23

Please sign in to comment.