mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
Prevent NULL dereference if kmalloc() fails. Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: Douglas Schilling Landgraf <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
34e383dd13
commit
1601fb1498
1 changed files with 2 additions and 0 deletions
|
|
@ -337,6 +337,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue