diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-09-18 20:09:52 -0300 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-09-18 20:09:52 -0300 |
commit | 49cbf78b4386e4d4519cb6cd76af2b4c2bb8e395 (patch) | |
tree | 83e850d69057f7119c1a0784ab76fe3439d57456 /linux/drivers | |
parent | ac85cce0fbff71c931a44eed94f85c36426eed2c (diff) | |
download | mediapointer-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.c | 2 |
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; |