arm64: simplify pgd_alloc
authorMark Rutland <mark.rutland@arm.com>
Wed, 5 Feb 2014 10:24:13 +0000 (10:24 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 21 May 2014 14:57:35 +0000 (15:57 +0100)
commit007f5253a50c554755465c7e586947b8baf6f18a
tree3cc06601e8c8c05f37c13514e8aeb9f7546530fd
parent94464a71aadc3a3801fe0ca6b9a7f3ca566e3a83
arm64: simplify pgd_alloc

Currently pgd_alloc has a redundant NULL check in its return path that
can be removed with no ill effects. With that removed it's also possible
to return early and eliminate the new_pgd temporary variable.

This patch applies said modifications, making the logic of pgd_alloc
correspond 1-1 with that of pgd_free.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 883d50a0ed403446437444a495356ce31e1197a3)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/mm/pgd.c