diff options
author | Douglas Schilling Landgraf <dougsland@linuxtv.org> | 2008-11-11 23:30:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-16 23:54:35 -0200 |
commit | 11eb260a70b992b83fa2d15bb777cda3ee326c05 (patch) | |
tree | 45eca3b78fc28cae6e0138c9256754d944cfb3d1 /drivers | |
parent | d7c31a1e754b5140eefeeb10c3c3be17f3702452 (diff) | |
download | linux-11eb260a70b992b83fa2d15bb777cda3ee326c05.tar.gz linux-11eb260a70b992b83fa2d15bb777cda3ee326c05.tar.bz2 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')
-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 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); |