]> git.karo-electronics.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>
Mon, 30 Sep 2013 12:09:48 +0000 (14:09 +0200)
commitc90b09bcd60a966b122c09a3054423fcf99f3bab
tree14336db1cfd83f8bdee101e64b92173095b2cf98
parent47c323f71f8dd3df174fa33a7ee05086069bc5ab
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