Dan Carpenter 21e87daece KVM: arm64: timers: Fix resource leaks in kvm_timer_hyp_init()
Smatch detected this bug:
    arch/arm64/kvm/arch_timer.c:1425 kvm_timer_hyp_init()
    warn: missing unwind goto?

There are two resources to be freed the vtimer and ptimer.  The
line that Smatch complains about should free the vtimer first
before returning and then after that cleanup code should free
the ptimer.

I've added a out_free_ptimer_irq to free the ptimer and renamed
the existing label to out_free_vtimer_irq.

Fixes: 9e01dc76be6a ("KVM: arm/arm64: arch_timer: Assign the phys timer on VHE systems")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/72fffc35-7669-40b1-9d14-113c43269cf3@kili.mountain
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-06-13 12:06:05 +00:00
..
2023-05-03 11:00:27 -07:00
2023-05-30 16:24:28 +00:00
2023-05-04 12:45:32 -07:00
2023-02-21 15:27:48 -08:00
2023-02-21 15:27:48 -08:00