]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path
authorKautuk Consul <consul.kautuk@gmail.com>
Wed, 30 Nov 2011 04:03:08 +0000 (15:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Nov 2011 04:13:35 +0000 (15:13 +1100)
commitb45779e0df5ff3b3ab6b9723ac5d1d97555c67e5
treebc206da96cf64fcc09a19fd1d41c78bc2bea4cd0
parent57e6fdab84b2657a0102a48bd0dfbb7a56ad383b
mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path

If either of the vas or vms arrays are not properly kzalloced, then the
code jumps to the err_free label.

The err_free label runs a loop to check and free each of the array members
of the vas and vms arrays which is not required for this situation as none
of the array members have been allocated till this point.

Eliminate the extra loop we have to go through by introducing a new label
err_free2 and then jumping to it.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c