diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-18 19:09:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:53:10 -0400 |
commit | 1601fb14980b1295e00087460d57256a87f334bf (patch) | |
tree | 0ecd9c2695f83fcf3149e0bddc348000278f4f2c /drivers | |
parent | 34e383dd13edf402e87bf0a87f4a19b193b4bd7a (diff) |
V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
Prevent NULL dereference if kmalloc() fails.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-usb/m920x.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index aec7a1943b66..ef9b7bed13ff 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -337,6 +337,8 @@ static int m920x_firmware_download(struct usb_device *udev, const struct firmwar | |||
337 | int i, pass, ret = 0; | 337 | int i, pass, ret = 0; |
338 | 338 | ||
339 | buff = kmalloc(65536, GFP_KERNEL); | 339 | buff = kmalloc(65536, GFP_KERNEL); |
340 | if (buff == NULL) | ||
341 | return -ENOMEM; | ||
340 | 342 | ||
341 | if ((ret = m920x_read(udev, M9206_FILTER, 0x0, 0x8000, read, 4)) != 0) | 343 | if ((ret = m920x_read(udev, M9206_FILTER, 0x0, 0x8000, read, 4)) != 0) |
342 | goto done; | 344 | goto done; |