hm2_pci: fix unload after failed registration
hm2_pci: fix unload after failed registration

A bug was introduced at 44e7da328: after a failed registration (e.g.,
due to a bad firmware path) the hm2_pci kernel module could not be
unloaded because it still had a PCI device registration.

(in rtai, at least), rtapi_app_exit isn't called called when
rtapi_app_main returns with an error code.  Therefore it's necessary
to pci_unregister_driver in the error paths that follow the registration.

kinsamanka/machinekit,narogon/linuxcnc,bobvanderlinden/machinekit,araisrobo/machinekit,bmwiedemann/linuxcnc-mirror,ikcalB/linuxcnc-mirror,cdsteinkuehler/MachineKit,strahlex/machinekit,ArcEye/MK-Qt5,RunningLight/machinekit,RunningLight/machinekit,araisrobo/linuxcnc,ArcEye/MK-Qt5,bobvanderlinden/machinekit,jaguarcat79/ILC-with-LinuxCNC,ianmcmahon/linuxcnc-mirror,araisrobo/machinekit,mhaberler/machinekit,kinsamanka/machinekit,narogon/linuxcnc,araisrobo/machinekit,mhaberler/machinekit,araisrobo/machinekit,bobvanderlinden/machinekit,mhaberler/machinekit,cnc-club/linuxcnc,ArcEye/MK-Qt5,unseenlaser/linuxcnc,ianmcmahon/linuxcnc-mirror,unseenlaser/machinekit,unseenlaser/machinekit,Cid427/machinekit,unseenlaser/machinekit,ArcEye/MK-Qt5,bobvanderlinden/machinekit,EqAfrica/machinekit,ianmcmahon/linuxcnc-mirror,bobvanderlinden/machinekit,cnc-club/linuxcnc,RunningLight/machinekit,ArcEye/MK-Qt5,aschiffler/linuxcnc,EqAfrica/machinekit,EqAfrica/machinekit,jaguarcat79/ILC-with-LinuxCNC,cdsteinkuehler/linuxcnc,ArcEye/machinekit-testing,ikcalB/linuxcnc-mirror,cnc-club/linuxcnc,mhaberler/machinekit,EqAfrica/machinekit,unseenlaser/machinekit,ianmcmahon/linuxcnc-mirror,narogon/linuxcnc,narogon/linuxcnc,cdsteinkuehler/MachineKit,ArcEye/MK-Qt5,ArcEye/machinekit-testing,Cid427/machinekit,cdsteinkuehler/linuxcnc,ArcEye/MK-Qt5,aschiffler/linuxcnc,bobvanderlinden/machinekit,araisrobo/machinekit,ikcalB/linuxcnc-mirror,EqAfrica/machinekit,jaguarcat79/ILC-with-LinuxCNC,unseenlaser/machinekit,kinsamanka/machinekit,ArcEye/machinekit-testing,Cid427/machinekit,strahlex/machinekit,bmwiedemann/linuxcnc-mirror,narogon/linuxcnc,cnc-club/linuxcnc,ArcEye/machinekit-testing,cdsteinkuehler/MachineKit,ianmcmahon/linuxcnc-mirror,mhaberler/machinekit,bmwiedemann/linuxcnc-mirror,jaguarcat79/ILC-with-LinuxCNC,cnc-club/linuxcnc,bmwiedemann/linuxcnc-mirror,Cid427/machinekit,ikcalB/linuxcnc-mirror,Cid427/machinekit,bobvanderlinden/machinekit,bmwiedemann/linuxcnc-mirror,RunningLight/machinekit,cdsteinkuehler/linuxcnc,cdsteinkuehler/linuxcnc,RunningLight/machinekit,ikcalB/linuxcnc-mirror,RunningLight/machinekit,strahlex/machinekit,ianmcmahon/linuxcnc-mirror,aschiffler/linuxcnc,kinsamanka/machinekit,EqAfrica/machinekit,cnc-club/linuxcnc,cdsteinkuehler/MachineKit,ikcalB/linuxcnc-mirror,kinsamanka/machinekit,strahlex/machinekit,ianmcmahon/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,Cid427/machinekit,kinsamanka/machinekit,strahlex/machinekit,unseenlaser/linuxcnc,Cid427/machinekit,ikcalB/linuxcnc-mirror,mhaberler/machinekit,cdsteinkuehler/MachineKit,araisrobo/machinekit,bobvanderlinden/machinekit,jaguarcat79/ILC-with-LinuxCNC,EqAfrica/machinekit,araisrobo/machinekit,kinsamanka/machinekit,strahlex/machinekit,strahlex/machinekit,ArcEye/machinekit-testing,kinsamanka/machinekit,araisrobo/machinekit,Cid427/machinekit,ArcEye/machinekit-testing,cdsteinkuehler/linuxcnc,unseenlaser/machinekit,unseenlaser/linuxcnc,araisrobo/linuxcnc,RunningLight/machinekit,ArcEye/machinekit-testing,RunningLight/machinekit,unseenlaser/machinekit,mhaberler/machinekit,unseenlaser/linuxcnc,ArcEye/machinekit-testing,cdsteinkuehler/linuxcnc,bmwiedemann/linuxcnc-mirror,araisrobo/linuxcnc,unseenlaser/machinekit,aschiffler/linuxcnc,EqAfrica/machinekit,araisrobo/linuxcnc,mhaberler/machinekit,unseenlaser/linuxcnc,araisrobo/machinekit,araisrobo/linuxcnc,aschiffler/linuxcnc,ArcEye/MK-Qt5,cdsteinkuehler/MachineKit,cnc-club/linuxcnc