]> Git Repo - qemu.git/commit - hw/ppc/spapr.c
spapr: drop useless sanity check in spapr_irq_alloc*()
authorGreg Kurz <[email protected]>
Wed, 11 Apr 2018 17:46:06 +0000 (19:46 +0200)
committerDavid Gibson <[email protected]>
Fri, 27 Apr 2018 08:05:22 +0000 (18:05 +1000)
commit1d36c75a9ebf6bddbdb46693052a48ef134f3699
tree43c494c56da32e2ee4b329d666d9d6e1238de980
parent2b10808539d7ace3d9b1226a71a68e2431ef2176
spapr: drop useless sanity check in spapr_irq_alloc*()

Both spapr_irq_alloc() and spapr_irq_alloc_block() have an errp
parameter, but they don't use it if XICS hasn't been initialized
yet.

This is doubly wrong:

- all callers do pass a non-null Error **, ie, they expect an error
  to be propagated in case of failure

- XICS obviously needs to be initialized before anything starts allocating
  IRQs

So this patch turns the check into an assert.

Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
hw/ppc/spapr.c
This page took 0.02636 seconds and 4 git commands to generate.