]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ENGR00160834 UTP : replace kzalloc() with vmalloc()
authorHuang Shijie <b32955@freescale.com>
Wed, 26 Oct 2011 09:31:25 +0000 (17:31 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Fri, 30 Oct 2015 16:40:52 +0000 (17:40 +0100)
commit92398098ded852fd239c6a9141eb8db7bafa9c82
treebde278ac2cb95a5cede72e0c1f4b37783c972e92
parent095f0c0270343d2b0a75321e5aef109673dd0088
ENGR00160834 UTP : replace kzalloc() with vmalloc()

When allocating large memory, such as 128K,
vmalloc() uses single page for the allocation process,
while kzalloc() has to consume a continuous pages for the allocation.

In low memory case, the kzalloc() may fails.
So use the vmalloc() instead.

Also add some sanity check for the NULL pointer.

Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/usb/gadget/fsl_updater.c