summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-11 23:30:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-16 23:54:35 -0200
commit11eb260a70b992b83fa2d15bb777cda3ee326c05 (patch)
tree45eca3b78fc28cae6e0138c9256754d944cfb3d1 /drivers/media
parentd7c31a1e754b5140eefeeb10c3c3be17f3702452 (diff)
downloadblackbird-op-linux-11eb260a70b992b83fa2d15bb777cda3ee326c05.tar.gz
blackbird-op-linux-11eb260a70b992b83fa2d15bb777cda3ee326c05.zip
V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation
Added validation for NULL pointer Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 66ab0c6e9783..5faeee3f70bf 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -808,6 +808,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);
OpenPOWER on IntegriCloud