powerpc/kvm/book3s_pr: Return appropriate error when allocation fails
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Wed, 17 Jul 2013 15:10:29 +0000 (12:10 -0300)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 9 Aug 2013 08:06:54 +0000 (18:06 +1000)
commite0e13614626bfb5a88678fd951d728ed40e3cbf6
tree34ef657486ca32b5c0de2026ed6864dbecb5b2e9
parent2fb10672c828f6e08f1dbe3690167300035adddc
powerpc/kvm/book3s_pr: Return appropriate error when allocation fails

err was overwritten by a previous function call, and checked to be 0. If
the following page allocation fails, 0 is going to be returned instead
of -ENOMEM.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kvm/book3s_pr.c