summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-budget
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-12 00:30:49 -0200
committerDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-12 00:30:49 -0200
commitbe08890b0323e39e6026b00048343971e10033a9 (patch)
treee90bee113fb2bc8f1a93fab7d39ebaa54e790d86 /linux/drivers/media/dvb/ttusb-budget
parentbcabc8095d80312e5fcc817372cf97ae51b55cbd (diff)
downloadmediapointer-dvb-s2-be08890b0323e39e6026b00048343971e10033a9.tar.gz
mediapointer-dvb-s2-be08890b0323e39e6026b00048343971e10033a9.tar.bz2
dvb-ttusb-budget: 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-budget')
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 13085a8e2..9271e2366 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -828,6 +828,12 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
ISO_BUF_COUNT,
&ttusb->iso_dma_handle);
+ if (!ttusb->iso_buffer) {
+ dprintk("%s: pci_alloc_consistent - not enough memory\n",
+ __func__);
+ return -ENOMEM;
+ }
+
memset(ttusb->iso_buffer, 0,
ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT);