[ERD][NEUS7920-76] [COMMON] lib: dss: add null check before refer to desc->action
authorHyunki Koo <hyunki00.koo@samsung.com>
Thu, 11 Oct 2018 10:27:21 +0000 (19:27 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 30 Aug 2019 07:58:56 +0000 (16:58 +0900)
Change-Id: I9f5211c8a08b94ce5430cb49995e5be79d3ab567
Signed-off-by: Hyunki Koo <hyunki00.koo@samsung.com>
kernel/irq/irqdesc.c

index fbdea4868f43291f9a946d887a2d39031ea71b73..2d13dd5899f74e5f1228518752be7177c6e0cba8 100644 (file)
@@ -602,20 +602,25 @@ void irq_init_desc(unsigned int irq)
 int generic_handle_irq(unsigned int irq)
 {
        struct irq_desc *desc = irq_to_desc(irq);
-       struct irqaction *action;
+       irq_handler_t handler;
        unsigned long long start_time;
 
        if (!desc)
                return -EINVAL;
 
-       action = desc->action;
        dbg_snapshot_irq_var(start_time);
-       dbg_snapshot_irq(irq, (void *)action->handler, (void *)desc,
+
+       if (likely(desc->action))
+               handler = desc->action->handler;
+       else
+               handler = NULL;
+
+       dbg_snapshot_irq(irq, (void *)handler, (void *)desc,
                                0, DSS_FLAG_IN);
 
        generic_handle_irq_desc(desc);
 
-       dbg_snapshot_irq(irq, (void *)action->handler, (void *)desc,
+       dbg_snapshot_irq(irq, (void *)handler, (void *)desc,
                                start_time, DSS_FLAG_OUT);
 
        return 0;