diff options
Diffstat (limited to 'drivers/media/video/hdpvr/hdpvr-video.c')
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-video.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index 2eb9dc2ebe59..b5439cabb381 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c | |||
@@ -139,7 +139,7 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) | |||
139 | urb = usb_alloc_urb(0, GFP_KERNEL); | 139 | urb = usb_alloc_urb(0, GFP_KERNEL); |
140 | if (!urb) { | 140 | if (!urb) { |
141 | v4l2_err(&dev->v4l2_dev, "cannot allocate urb\n"); | 141 | v4l2_err(&dev->v4l2_dev, "cannot allocate urb\n"); |
142 | goto exit; | 142 | goto exit_urb; |
143 | } | 143 | } |
144 | buf->urb = urb; | 144 | buf->urb = urb; |
145 | 145 | ||
@@ -148,7 +148,7 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) | |||
148 | if (!mem) { | 148 | if (!mem) { |
149 | v4l2_err(&dev->v4l2_dev, | 149 | v4l2_err(&dev->v4l2_dev, |
150 | "cannot allocate usb transfer buffer\n"); | 150 | "cannot allocate usb transfer buffer\n"); |
151 | goto exit; | 151 | goto exit_urb_buffer; |
152 | } | 152 | } |
153 | 153 | ||
154 | usb_fill_bulk_urb(buf->urb, dev->udev, | 154 | usb_fill_bulk_urb(buf->urb, dev->udev, |
@@ -161,6 +161,10 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) | |||
161 | list_add_tail(&buf->buff_list, &dev->free_buff_list); | 161 | list_add_tail(&buf->buff_list, &dev->free_buff_list); |
162 | } | 162 | } |
163 | return 0; | 163 | return 0; |
164 | exit_urb_buffer: | ||
165 | usb_free_urb(urb); | ||
166 | exit_urb: | ||
167 | kfree(buf); | ||
164 | exit: | 168 | exit: |
165 | hdpvr_free_buffers(dev); | 169 | hdpvr_free_buffers(dev); |
166 | return retval; | 170 | return retval; |