No need for checking them to be NULL, we need them in both
implementations.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/arm/irqchip.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/hypervisor/arch/arm/irqchip.c b/hypervisor/arch/arm/irqchip.c
index 7f81eb8..a177220 100644
--- a/hypervisor/arch/arm/irqchip.c
+++ b/hypervisor/arch/arm/irqchip.c
@@ -127,20 +127,14 @@ int irqchip_send_sgi(struct sgi *sgi)
 
 int irqchip_cpu_init(struct per_cpu *cpu_data)
 {
-       if (irqchip.cpu_init)
-               return irqchip.cpu_init(cpu_data);
-
-       return 0;
+       return irqchip.cpu_init(cpu_data);
 }
 
 int irqchip_cpu_reset(struct per_cpu *cpu_data)
 {
        cpu_data->pending_irqs_head = cpu_data->pending_irqs_tail = 0;
 
-       if (irqchip.cpu_reset)
-               return irqchip.cpu_reset(cpu_data, false);
-
-       return 0;
+       return irqchip.cpu_reset(cpu_data, false);
 }
 
 void irqchip_cpu_shutdown(struct per_cpu *cpu_data)
@@ -150,8 +144,7 @@ void irqchip_cpu_shutdown(struct per_cpu *cpu_data)
         * it has been initialised: this function may be executed during the
         * setup phase.
         */
-       if (irqchip.cpu_reset)
-               irqchip.cpu_reset(cpu_data, true);
+       irqchip.cpu_reset(cpu_data, true);
 }
 
 static const struct jailhouse_irqchip *
-- 
2.1.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to