Skip to content

Commit cd5ff94

Browse files
xiongzhongjiangmpe
authored andcommitted
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>
1 parent 9258227 commit cd5ff94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arch/powerpc/sysdev/xive/common.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,12 +1010,13 @@ static void xive_ipi_eoi(struct irq_data *d)
10101010
{
10111011
struct xive_cpu *xc = __this_cpu_read(xive_cpu);
10121012

1013-
DBG_VERBOSE("IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\n",
1014-
d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio);
1015-
10161013
/* Handle possible race with unplug and drop stale IPIs */
10171014
if (!xc)
10181015
return;
1016+
1017+
DBG_VERBOSE("IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\n",
1018+
d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio);
1019+
10191020
xive_do_source_eoi(xc->hw_ipi, &xc->ipi_data);
10201021
xive_do_queue_eoi(xc);
10211022
}

0 commit comments

Comments
 (0)