diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-04 14:51:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-04 14:51:50 -0300 |
commit | 88778479f1fa5916aa079b9c17929716ebc182a6 (patch) | |
tree | 8960ed0705c81262a8b534cf182c6b56d07bb6b4 /linux/drivers/media/video/uvc/uvc_status.c | |
parent | 5fa51c4127709c7bcbcbbc6e14b4780908e36990 (diff) | |
parent | edd1d19fe9c951f51b87b6a614f3e5abc2a6c12e (diff) | |
download | mediapointer-dvb-s2-88778479f1fa5916aa079b9c17929716ebc182a6.tar.gz mediapointer-dvb-s2-88778479f1fa5916aa079b9c17929716ebc182a6.tar.bz2 |
merge: http://linuxtv.org/hg/~tmerle/cinergyT2
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/uvc/uvc_status.c')
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_status.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_status.c b/linux/drivers/media/video/uvc/uvc_status.c index 75e678ac5..5d60b264d 100644 --- a/linux/drivers/media/video/uvc/uvc_status.c +++ b/linux/drivers/media/video/uvc/uvc_status.c @@ -177,9 +177,15 @@ int uvc_status_init(struct uvc_device *dev) uvc_input_init(dev); + dev->status = kzalloc(UVC_MAX_STATUS_SIZE, GFP_KERNEL); + if (dev->status == NULL) + return -ENOMEM; + dev->int_urb = usb_alloc_urb(0, GFP_KERNEL); - if (dev->int_urb == NULL) + if (dev->int_urb == NULL) { + kfree(dev->status); return -ENOMEM; + } pipe = usb_rcvintpipe(dev->udev, ep->desc.bEndpointAddress); @@ -192,7 +198,7 @@ int uvc_status_init(struct uvc_device *dev) interval = fls(interval) - 1; usb_fill_int_urb(dev->int_urb, dev->udev, pipe, - dev->status, sizeof dev->status, uvc_status_complete, + dev->status, UVC_MAX_STATUS_SIZE, uvc_status_complete, dev, interval); return usb_submit_urb(dev->int_urb, GFP_KERNEL); @@ -202,6 +208,7 @@ void uvc_status_cleanup(struct uvc_device *dev) { usb_kill_urb(dev->int_urb); usb_free_urb(dev->int_urb); + kfree(dev->status); uvc_input_cleanup(dev); } |