libqos/ahci: Add ahci_port_check_error helper