bus/ifpga: fix null pointer dereference in scan