KVM: arm64: Tolerate an empty target_table list
authorJames Morse <james.morse@arm.com>
Mon, 22 Jun 2020 11:33:14 +0000 (11:33 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 5 Jul 2020 17:20:45 +0000 (18:20 +0100)
commit04343ae312ef0d80d601ea1b784b6b039ae9c82a
tree4848dd3da5a2989c6fe90cde9fc464f6c1aac4da
parent6b33e0d64f8501b51d32069e08d3ed68c58c25b4
KVM: arm64: Tolerate an empty target_table list

Before emptying the target_table lists, and then removing their
infrastructure, add some tolerance to an empty list.

Instead of bugging-out on an empty list, pretend we already
reached the end in the two-list-walk.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200622113317.20477-3-james.morse@arm.com
arch/arm64/kvm/sys_regs.c