summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/xive
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-26 14:09:32 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-03 07:40:02 +0200
commitcd5ff94577e004e0a4457e70d0ef3a030f4010b8 (patch)
tree968e90737f40eac4361feacf9ef74847cfa5a780 /arch/powerpc/sysdev/xive
parentpowerpc/pseries: Fix how we iterate over the DTL entries (diff)
downloadlinux-cd5ff94577e004e0a4457e70d0ef3a030f4010b8.tar.xz
linux-cd5ff94577e004e0a4457e70d0ef3a030f4010b8.zip
powerpc/xive: Move a dereference below a NULL test
Move the dereference of xc below the NULL test. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/sysdev/xive')
-rw-r--r--arch/powerpc/sysdev/xive/common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 959a2a62f233..9824074ec1b5 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -1010,12 +1010,13 @@ static void xive_ipi_eoi(struct irq_data *d)
{
struct xive_cpu *xc = __this_cpu_read(xive_cpu);
- DBG_VERBOSE("IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\n",
- d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio);
-
/* Handle possible race with unplug and drop stale IPIs */
if (!xc)
return;
+
+ DBG_VERBOSE("IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\n",
+ d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio);
+
xive_do_source_eoi(xc->hw_ipi, &xc->ipi_data);
xive_do_queue_eoi(xc);
}