pios_hmc5983: use pios_semaphore
pios_hmc5983: fixed resource leak on allocation