Moved initialization code into configure hook

This is to allow the drivers to already communicate with the device
in the configure hook.

Cleaned-up doubled error checks in the process.
Line 50 is a different check. If the task explicitly opens for whatever reason, this check will fail while the check line 50 will pass. I think you are assuming that the only wait the task will open is if _io_port is set, which is not the case.

In other words: line 50 checks that the configuration is consistent, this line checks the task's configureHook behaviour.