summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-dec
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-12 00:27:59 -0200
committerDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-12 00:27:59 -0200
commitbcabc8095d80312e5fcc817372cf97ae51b55cbd (patch)
tree693ae49b676ddf932f3aa28fe48b5a5be81d14f7 /linux/drivers/media/dvb/ttusb-dec
parent1f0f6394be119a5916c8b5c6caa4910336544945 (diff)
downloadmediapointer-dvb-s2-bcabc8095d80312e5fcc817372cf97ae51b55cbd.tar.gz
mediapointer-dvb-s2-bcabc8095d80312e5fcc817372cf97ae51b55cbd.tar.bz2
ttusb_dec: Add NULL pointer validation
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Added validation for NULL pointer Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-dec')
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index 5c2885e17..9259cfe54 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1166,6 +1166,12 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
ISO_BUF_COUNT),
&dec->iso_dma_handle);
+ if (!dec->iso_buffer) {
+ dprintk("%s: pci_alloc_consistent - not enough memory\n",
+ __func__);
+ return -ENOMEM;
+ }
+
memset(dec->iso_buffer, 0,
ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT));