Merge tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd
[firefly-linux-kernel-4.4.55.git] / drivers / mfd / ab8500-debugfs.c
index e33e385af0a29e7930e4277984c640a1cf1db975..d1a22aae2df51cda0936a52dc58e9df66c493f7d 100644 (file)
@@ -1600,7 +1600,6 @@ static int ab8500_interrupts_print(struct seq_file *s, void *p)
 
        for (line = 0; line < num_interrupt_lines; line++) {
                struct irq_desc *desc = irq_to_desc(line + irq_first);
-               struct irqaction *action = desc->action;
 
                seq_printf(s, "%3i:  %6i %4i", line,
                           num_interrupts[line],
@@ -1608,7 +1607,9 @@ static int ab8500_interrupts_print(struct seq_file *s, void *p)
 
                if (desc && desc->name)
                        seq_printf(s, "-%-8s", desc->name);
-               if (action) {
+               if (desc && desc->action) {
+                       struct irqaction *action = desc->action;
+
                        seq_printf(s, "  %s", action->name);
                        while ((action = action->next) != NULL)
                                seq_printf(s, ", %s", action->name);