aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-11-11 21:27:59 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-16 20:54:29 -0500
commitd7c31a1e754b5140eefeeb10c3c3be17f3702452 (patch)
tree4fc645d6c8243222babf8a8ba15178e865005ef9 /drivers/media
parente14c8bf86350f6c39186a139c5c584a6111b2f01 (diff)
V4L/DVB (9601): ttusb_dec: 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-dec/ttusb_dec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index ab33fec8a19f..c1386e9b13d3 100644
--- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1157,6 +1157,12 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
1157 ISO_BUF_COUNT), 1157 ISO_BUF_COUNT),
1158 &dec->iso_dma_handle); 1158 &dec->iso_dma_handle);
1159 1159
1160 if (!dec->iso_buffer) {
1161 dprintk("%s: pci_alloc_consistent - not enough memory\n",
1162 __func__);
1163 return -ENOMEM;
1164 }
1165
1160 memset(dec->iso_buffer, 0, 1166 memset(dec->iso_buffer, 0,
1161 ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT)); 1167 ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT));
1162 1168