Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11eb260a authored by Douglas Schilling Landgraf's avatar Douglas Schilling Landgraf Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation



Added validation for NULL pointer

Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d7c31a1e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);