diff options
Diffstat (limited to 'drivers/media/dvb/ttusb-dec/ttusb_dec.c')
-rw-r--r-- | drivers/media/dvb/ttusb-dec/ttusb_dec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index ab33fec8a19f..0aa96df80fc2 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
@@ -1157,6 +1157,12 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec) | |||
1157 | ISO_BUF_COUNT), | 1157 | ISO_BUF_COUNT), |
1158 | &dec->iso_dma_handle); | 1158 | &dec->iso_dma_handle); |
1159 | 1159 | ||
1160 | if (!dec->iso_buffer) { | ||
1161 | dprintk("%s: pci_alloc_consistent - not enough memory\n", | ||
1162 | __func__); | ||
1163 | return -ENOMEM; | ||
1164 | } | ||
1165 | |||
1160 | memset(dec->iso_buffer, 0, | 1166 | memset(dec->iso_buffer, 0, |
1161 | ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT)); | 1167 | ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT)); |
1162 | 1168 | ||
@@ -1254,6 +1260,7 @@ static int ttusb_dec_init_usb(struct ttusb_dec *dec) | |||
1254 | dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, | 1260 | dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, |
1255 | GFP_ATOMIC, &dec->irq_dma_handle); | 1261 | GFP_ATOMIC, &dec->irq_dma_handle); |
1256 | if(!dec->irq_buffer) { | 1262 | if(!dec->irq_buffer) { |
1263 | usb_free_urb(dec->irq_urb); | ||
1257 | return -ENOMEM; | 1264 | return -ENOMEM; |
1258 | } | 1265 | } |
1259 | usb_fill_int_urb(dec->irq_urb, dec->udev,dec->irq_pipe, | 1266 | usb_fill_int_urb(dec->irq_urb, dec->udev,dec->irq_pipe, |