summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-09-18 20:09:52 -0300
committerDouglas Schilling Landgraf <dougsland@redhat.com>2009-09-18 20:09:52 -0300
commit49cbf78b4386e4d4519cb6cd76af2b4c2bb8e395 (patch)
tree83e850d69057f7119c1a0784ab76fe3439d57456 /linux/drivers
parentac85cce0fbff71c931a44eed94f85c36426eed2c (diff)
downloadmediapointer-dvb-s2-49cbf78b4386e4d4519cb6cd76af2b4c2bb8e395.tar.gz
mediapointer-dvb-s2-49cbf78b4386e4d4519cb6cd76af2b4c2bb8e395.tar.bz2
kmalloc failure ignored in m920x_firmware_download()
From: Roel Kluin <roel.kluin@gmail.com> Prevent NULL dereference if kmalloc() fails. Priority: normal Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/m920x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/m920x.c b/linux/drivers/media/dvb/dvb-usb/m920x.c
index 55d2bb8f6..0a686adec 100644
--- a/linux/drivers/media/dvb/dvb-usb/m920x.c
+++ b/linux/drivers/media/dvb/dvb-usb/m920x.c
@@ -340,6 +340,8 @@ static int m920x_firmware_download(struct usb_device *udev, const struct firmwar
int i, pass, ret = 0;
buff = kmalloc(65536, GFP_KERNEL);
+ if (buff == NULL)
+ return -ENOMEM;
if ((ret = m920x_read(udev, M9206_FILTER, 0x0, 0x8000, read, 4)) != 0)
goto done;