stlink: add error status check