Skip to content

Commit

Permalink
powerpc/xive: Move a dereference below a NULL test
Browse files Browse the repository at this point in the history
Move the dereference of xc below the NULL test.

Signed-off-by: zhong jiang <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
xiongzhongjiang authored and mpe committed Oct 3, 2018
1 parent 9258227 commit cd5ff94
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/powerpc/sysdev/xive/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cd5ff94

Please sign in to comment.