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>

authored by Douglas Schilling Landgraf and committed by Mauro Carvalho Chehab d7c31a1e e14c8bf8

+6
+6
drivers/media/dvb/ttusb-dec/ttusb_dec.c
··· 1157 ISO_BUF_COUNT), 1158 &dec->iso_dma_handle); 1159 1160 memset(dec->iso_buffer, 0, 1161 ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT)); 1162
··· 1157 ISO_BUF_COUNT), 1158 &dec->iso_dma_handle); 1159 1160 + if (!dec->iso_buffer) { 1161 + dprintk("%s: pci_alloc_consistent - not enough memory\n", 1162 + __func__); 1163 + return -ENOMEM; 1164 + } 1165 + 1166 memset(dec->iso_buffer, 0, 1167 ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT)); 1168