[PATCH] KVM: arm64: vgic: add default case to switch statement
Osama Abdelkader
osama.abdelkader at gmail.com
Thu Dec 11 14:40:28 PST 2025
The switch statement in vgic_validate_injection() handles all enum
values for irq->config, but lacked a default case. Add one to match
the pattern used in other switch statements in the same file and make
the defensive return explicit.
Signed-off-by: Osama Abdelkader <osama.abdelkader at gmail.com>
---
arch/arm64/kvm/vgic/vgic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c
index 430aa98888fd..a035ce6231e2 100644
--- a/arch/arm64/kvm/vgic/vgic.c
+++ b/arch/arm64/kvm/vgic/vgic.c
@@ -369,9 +369,9 @@ static bool vgic_validate_injection(struct vgic_irq *irq, bool level, void *owne
return irq->line_level != level;
case VGIC_CONFIG_EDGE:
return level;
+ default:
+ return false;
}
-
- return false;
}
static bool vgic_model_needs_bcst_kick(struct kvm *kvm)
--
2.43.0
More information about the linux-arm-kernel
mailing list