]> 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)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:55:54 +0000 (09:55 +0800)
commit23c4df731921360e0896c9029a158ca8c4f27dcc
treeaf4d00c498860b01c6c9bd492e70da3d2a9e4240
parent59c69b40793cc3ad63ba683bdc62e88579d71fe8
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