diff options
author | Douglas Schilling Landgraf <dougsland@linuxtv.org> | 2008-11-12 02:30:49 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-17 01:54:35 (GMT) |
commit | 11eb260a70b992b83fa2d15bb777cda3ee326c05 (patch) | |
tree | 45eca3b78fc28cae6e0138c9256754d944cfb3d1 /drivers/media/dvb/ttusb-budget | |
parent | d7c31a1e754b5140eefeeb10c3c3be17f3702452 (diff) | |
download | linux-fsl-qoriq-11eb260a70b992b83fa2d15bb777cda3ee326c05.tar.xz |
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/dvb/ttusb-budget')
-rw-r--r-- | drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 6 |
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 66ab0c6..5faeee3 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); |