Very much like the cleanup done for the detach call, try to address a
comment left behind and cleanup all the resources allocated in case
of error during attach. This is slightly less complex than
lkpi_pci_dev_release() as some of the lists cannot yet hold allocated
resources so we can skip this.
While this mostly a copy of lkpi_pci_dev_release(), we could possibly
call pci_put_dev() in any case and be done and let the (*release)
function do its job. However there are some uncertainties still
(see other comments) which would prevent us doing so. Punt for the
moment and leave a comment and revisit once more work on the cleanup
paths has finished.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days