spapr_pci: fix potential NULL pointer dereference