Skip to content

Commit

Permalink
V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation
Browse files Browse the repository at this point in the history
Added validation for NULL pointer

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Douglas Schilling Landgraf authored and Mauro Carvalho Chehab committed Nov 17, 2008
1 parent d7c31a1 commit 11eb260
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 11eb260

Please sign in to comment.