]> 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>
Thu, 12 Mar 2015 13:16:56 +0000 (14:16 +0100)
commit69df61a87fb2e053a65795c32029008d2e9aed2f
treef162163e29d4a682167ea810895cdcac47831418
parentafd1637befae53a0c2dba31faaea09d6f35188f3
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