summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-12 03:30:49 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-17 02:54:35 +0100
commit11eb260a70b992b83fa2d15bb777cda3ee326c05 (patch)
tree45eca3b78fc28cae6e0138c9256754d944cfb3d1
parentV4L/DVB (9601): ttusb_dec: Add NULL pointer validation (diff)
downloadlinux-11eb260a70b992b83fa2d15bb777cda3ee326c05.tar.xz
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>
-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);